-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
core[minor]: Add ID #5441
core[minor]: Add ID #5441
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -195,7 +208,12 @@ export abstract class BaseMessage | |||
// eslint-disable-next-line no-param-reassign | |||
fields.response_metadata = {}; | |||
} | |||
if (!fields.id) { | |||
// eslint-disable-next-line no-param-reassign | |||
fields.id = undefined; |
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.
This seems unnecessary?
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.
This is necessary. Otherwise ids added via mutation won' tbe serialized
Implemented in #5817 |
To BaseMessage. Similar to python https://github.com/langchain-ai/langchain/blob/e3f30b4cdebf750175e1764c969e6d56921c865d/libs/core/langchain_core/messages/base.py#L36