-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Failure constructing a tool message from params, MESSAGE_COERCION_FAILURE #7647
Comments
Hey there, @arturl! I'm here to help with any bugs, questions, or contributions you have in mind. Let's tackle this together! To resolve the "MESSAGE_COERCION_FAILURE" error when processing Additionally, you can modify the code by adding a check for else if (className === "ToolMessage") {
type = "tool";
} This change will allow the function to correctly process To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
Thanks for reporting - will fix! |
Live, please bump to |
Thanks for the prompt turnaround @jacoblee93, I will update! |
Fix confirmed, thanks again. |
Checked other resources
Example Code
see below
Error Message and Stack Trace (if applicable)
Description
My code builds a langchain graph where one of the nodes invokes a tool.
The messages are then serialized using
BaseCheckpointSaver
.One of the resulting messages looks like this:
This message fails in
_constructMessageFromParams
because it does not handleToolMessage
types:langchainjs/langchain-core/src/messages/utils.ts
Line 91 in 4587906
A suggested fix would be add the following lines just before the last
else
clause:System Info
Node.js version v18.20.3
The text was updated successfully, but these errors were encountered: