create_tool_calling_agent only ouput tool result in json instead of a straightfoward answer #25570
Replies: 1 comment
-
Hey there, @renyuantime! I'm here to help you with any bugs, questions, or contributions you have. Let's tackle this issue together while we wait for a human maintainer. The To get a straightforward text answer, you need to adjust the agent's logic to process the JSON output and format it into a human-readable response. Here are some steps to achieve this:
By following these steps, you can enhance your agent to not only perform searches using your custom tool but also to present those search results directly in its conversations with users, making the bot more informative and helpful [1]. Additionally, the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Checked other resources
Commit to Help
Example Code
Description
I built a create_tool_calling_agent that has the get_income_statement tool, which takes in company ticker,start_date, end_date and returns corresponding income statement data. when I asked "What is apple's revenue in 2022? ", the agent only returned me the data from the tools in JSON format instead of a text like' Apple's revenue in 2022 is xxxx'.( see picture) what went wrong, why can't the agent observer the tool result and return me a text with the answer of my question in it.

System Info
Linux
Beta Was this translation helpful? Give feedback.
All reactions