In handlers.llm, Tools must be equipped with both input and output type annotations. However, in the OpenAI API standard, tool specifications include JSON schemas encoding the types of the tool's arguments but not one for its output, meaning the LLM typically only sees the output value and not its type.
The additional information contained in the output type's schema may be useful for generation, especially when there is natural-language documentation carried by the type that complements the documentation of the Tool.
We should therefore consider injecting the output type schema automatically into the description field of the Tool encoding.
In
handlers.llm,Tools must be equipped with both input and output type annotations. However, in the OpenAI API standard, tool specifications include JSON schemas encoding the types of the tool's arguments but not one for its output, meaning the LLM typically only sees the output value and not its type.The additional information contained in the output type's schema may be useful for generation, especially when there is natural-language documentation carried by the type that complements the documentation of the
Tool.We should therefore consider injecting the output type schema automatically into the description field of the
Toolencoding.