Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider adding MessageId to ChatMessage and ChatResponseUpdate #6095

Open
stephentoub opened this issue Mar 12, 2025 · 0 comments
Open

Consider adding MessageId to ChatMessage and ChatResponseUpdate #6095

stephentoub opened this issue Mar 12, 2025 · 0 comments
Assignees
Labels
area-ai Microsoft.Extensions.AI libraries untriaged

Comments

@stephentoub
Copy link
Member

As tools and agents become more prevalent, it's more likely to have multiple messages that are part of a single overall operation, which is represented as a ChatResponse. We have a ResponseId on ChatResponse, but we lack a unique identifer on each invidual ChatMessage that makes up the ChatResponse. Similarly, ChatResponseUpdate has a ResponseId on it, but it doesn't have a MessageId. We end up using the ChatResponseUpdate.ResponseId logically as a message ID to differentiate where one message ends and another begins in a stream, but this could be made cleaner by making the grouping of updates into messages more explicit by having a MessageId on each ChatResponseUpdate in addition to the ResponseId.

@github-actions github-actions bot added the area-ai Microsoft.Extensions.AI libraries label Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-ai Microsoft.Extensions.AI libraries untriaged
Projects
None yet
Development

No branches or pull requests

2 participants