-
Notifications
You must be signed in to change notification settings - Fork 953
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
langgraph[patch]: ToolNode support for tools outputting msg #977
Conversation
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.
nice, thank you!
content=str_output(output), name=call["name"], tool_call_id=call["id"] | ||
) | ||
content = f"Error: {repr(e)}\n Please fix your mistakes." | ||
return ToolMessage(content, name=call["name"], tool_call_id=call["id"]) |
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.
why are we no lnoger passing content by keyword?
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.
cleaner this way (imo), messages accept content as pos arg
So tools always return a tool message in this formulation? I must have missed where we guarantee this; it' sin the TOolCall itself? |
tools always return tool message if input is a ToolCall with "type" and "id" set |
After langchain-ai/langchain#24038, tools will be able to take in typed ToolCalls directly and will output a ToolMessage when invoked with a ToolCall
Requires
langchain-core==0.2.16
to be released