-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Feature/agentchat message id field 6317 #6645
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
Feature/agentchat message id field 6317 #6645
Conversation
…on guide- Fix version format from 0.4.0-dev-1 to 0.4.0-dev.1 for all packages- Remove reference to non-existent Microsoft.AutoGen.Extensions package- Add correct extension packages: Aspire, MEAI, and SemanticKernel- Fix typo: RuntimeGatewway -> RuntimeGateway- Improve documentation structure with clear section headersFixes #6244
Fix issue #6277 where TextMessage was used but not imported in three code cells of the custom agents documentation, causing NameError when users run the examples. Changes: - Add TextMessage to imports in ArithmeticAgent section - Add TextMessage to imports in GeminiAssistantAgent section - Add TextMessage to imports in Declarative GeminiAssistantAgent section The CountDownAgent section already had the correct import. Fixes #6277
Add unique id field to BaseChatMessage and BaseAgentEvent, plus full_message_id to ModelClientStreamingChunkEvent for streaming correlation. Closes #6317
|
@microsoft-github-policy-service agree |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6645 +/- ##
==========================================
+ Coverage 79.74% 79.75% +0.01%
==========================================
Files 232 232
Lines 17403 17414 +11
==========================================
+ Hits 13878 13889 +11
Misses 3525 3525
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you fix the formatting? See instructions in python/README.md
|
Hello @victordibia Sir, Can you please review this PR ? |
…stallation guide- Fix version format from 0.4.0-dev-1 to 0.4.0-dev.1 for all packages- Remove reference to non-existent Microsoft.AutoGen.Extensions package- Add correct extension packages: Aspire, MEAI, and SemanticKernel- Fix typo: RuntimeGatewway -> RuntimeGateway- Improve documentation structure with clear section headersFixes #6244" This reverts commit 6d9fb2e.
…tation" This reverts commit d07898b.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also update assistant agent to use this id to generate chunk events
Hello @ekzhu Sir, I have implemented the feature. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use default factory unless for streaming chunk events
python/packages/autogen-agentchat/src/autogen_agentchat/agents/_assistant_agent.py
Outdated
Show resolved
Hide resolved
python/packages/autogen-agentchat/src/autogen_agentchat/agents/_assistant_agent.py
Outdated
Show resolved
Hide resolved
python/packages/autogen-agentchat/src/autogen_agentchat/agents/_assistant_agent.py
Outdated
Show resolved
Hide resolved
…chitecture, lower memory footprint, safer for concurrency
Why are these changes needed?
This PR implements unique ID fields for AgentChat messages to enable proper correlation between streaming chunks and completed messages. Currently, there's no way to correlate
ModelClientStreamingChunkEventchunks with their eventual completed message, which can lead to duplicate message display in streaming scenarios.The implementation adds:
id: strfield toBaseChatMessagewith automatic UUID generationid: strfield toBaseAgentEventwith automatic UUID generationfull_message_id: str | Nonefield toModelClientStreamingChunkEventfor chunk-to-message correlationThis allows consumers of the streaming API to avoid double-printing messages by correlating chunks with their final complete message.
Related issue number
Closes #6317
Checks