-
Notifications
You must be signed in to change notification settings - Fork 19.2k
refactor(core): remove example
attribute from AIMessage
and HumanMessage
#32565
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
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Pull Request Overview
This PR removes the deprecated example
attribute from both AIMessage
and HumanMessage
classes. The attribute was previously marked as discouraged and ignored by most models, making it safe to remove for API cleanup.
Key changes:
- Removed
example
field definition and documentation from both message classes - Removed validation logic for
example
field mismatches in AIMessageChunk concatenation - Updated all test expectations to exclude the
example
field from message objects
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
libs/core/langchain_core/messages/ai.py | Removed example attribute definition and validation logic from AIMessage and AIMessageChunk |
libs/core/langchain_core/messages/human.py | Removed example attribute definition from HumanMessage |
libs/core/tests/unit_tests/test_messages.py | Updated tests to remove example field usage and validation |
libs/core/tests/unit_tests/prompts/test_few_shot.py | Updated expected message objects to exclude example field |
libs/core/tests/unit_tests/prompts/test_chat.py | Updated expected message objects to exclude example field |
libs/core/tests/unit_tests/runnables/snapshots/test_graph.ambr | Updated schema snapshots to remove example field |
libs/core/tests/unit_tests/prompts/snapshots/test_chat.ambr | Updated schema snapshots to remove example field |
libs/langchain/tests/unit_tests/agents/test_agent.py | Updated test expectations to exclude example field |
CodSpeed WallTime Performance ReportMerging #32565 will not alter performanceComparing
|
example
attribute from AIMessage and HumanMessage
example
attribute from AIMessage
and HumanMessage
CodSpeed Instrumentation Performance ReportMerging #32565 will not alter performanceComparing Summary
|
No description provided.