- Notifications
You must be signed in to change notification settings - Fork20.1k
fix(core): use tool_calls instead of deprecated function_call in get_buffer_string#34355
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
fix(core): use tool_calls instead of deprecated function_call in get_buffer_string#34355
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…buffer_stringget_buffer_string now checks for the modern tool_calls field onAIMessage before falling back to the deprecated function_call inadditional_kwargs. This ensures tool call information is properlyincluded in the buffer output for modern LLM providers.Fixeslangchain-ai#33970
CodSpeed Performance ReportMerging#34355 willnot alter performanceComparing
|
Summary
Fixes#33970
get_buffer_stringwas only checking for the deprecatedfunction_callfield inadditional_kwargs, which modern LLM providers no longer return. This fix updates the function to check for the moderntool_callsfield first, falling back tofunction_callfor legacy compatibility.Changes
AIMessage.tool_callsfirst (modern standard)additional_kwargs["function_call"](legacy support)Testing
get_buffer_stringtests passfunction_callbehavior preservedNote
This PR was developed with AI agent assistance (Factory/Droid).