-
Notifications
You must be signed in to change notification settings - Fork 33
Description
Tool results often contain a lot of structure such as dictionaries and lists that are important in conserving the authenticity of their output.
However, _execute_tool_calls, which calls the tools always compresses the resulting output returned to the agent into a single string. result_model is available to reformat the data returned by the tool but only after the original structure has been lost, and can only do so on the final completion. This leads to the loss of a lot of important structure data and lower performance by the model that is calling the tool.
The agentic tool calling engine squashes the output to a string here: https://github.com/supercog-ai/agentic/blob/main/src/agentic/actor_agents.py#L419
Should there be a way to preserve the structure better, such as returning a json in these cases?