When adding few shot examples for tool calling, the tool calling part of AIMessage is not getting formatted in the prompt. #30727
Unanswered
ksaurabh21
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Checked other resources
Commit to Help
Example Code
Description
Trying to create a prompt that includes few shot example of tool calling (code included is from )
The output of this code is:
`System: You are bad at math but are an expert at using a calculator.
Use past tool usage as an example of how to correctly use the tools.
Human: What's the product of 317253 and 128472 plus four
AI:
Tool: 16505054784
AI:
Tool: 16505054788
AI: The product of 317253 and 128472 plus four is 16505054788
Human: What's the product of 317253 and 128472 plus four`
System Info
langchain-core==0.3.50; python_version >= '3.9' and python_version < '4.0'
langchain-openai==0.3.12; python_version >= '3.9' and python_version < '4.0'
Beta Was this translation helpful? Give feedback.
All reactions