Tool def with a plain object JSON schema causes api error

The AI is not provided “write whatever function you want”. It has specific keys and key value types given to it for the function in the specification.

You cannot have arbitrary AI made-up key names in an object. You can however have what you describe with “number” JSON data type - this AI that can load its own functions, for example.

1 Like