Tool def with a plain object JSON schema causes api error

Besides a year of documentation and forum examples, you can just observe how the properties of a function are placed into AI context. I have a write-up here where you can see the translation of JSON keys into AI’s language specification of how to send to functions.

Understanding how the function specification is actually employed and understood by the AI will help you along, in making schemas that can be even accepted by the OpenAI API.

Python openai library sends JSON, and the API accepts JSON, which is translated from your streamable python object.

2 Likes