Assistants? gpt-4o-mini?
Colons:
You can see now, of course, the thread is useless, having emitted a tool_call with nothing to respond.
The file_search was also useless, not being invoked before responding, and the AI only able to complete the JSON.
Here is the exact function added (which just previously blocked “weather” when it was made the only tool choice by API parameter, to make output any sort of reliable).
{
"name": "structured_response_schema",
"description": "Mandatory output format to respond to user",
"strict": true,
"parameters": {
"type": "object",
"properties": {
"response part 1: hidden thinking and reasoning": {
"type": "string",
"description": "A non-displayed output for you to write step-by-step thoughts about how you will approach producing the desired response - and what response will be most fulfilling."
},
"response part 2: displayed response to user": {
"type": "string",
"description": "Part 2 is for responding to a user, only after you've outlined everything that will be included in the response and have a good idea of a method to produce a factual answer."
}
},
"required": [
"response part 1: hidden thinking and reasoning",
"response part 2: displayed response to user"
],
"additionalProperties": false
}
}
Observe the placement of strict at the nest level.
Then that output format has to be placed within this as part of a list of functions:
{
"type": "function",
"function": {schema}
}
If the function was strict, you would not have any ability for the AI to write function keys differently. If you can talk to the AI and tell it that a key must be removed or added or renamed, it is not strict.
In Assistants, I can send a error back about the tool output keys having colons, and the AI is stuck in a loop forever that will probably bill me a bunch of tokens of the API behind assistants refusing the bad keys then written:
You can also change your tool description or property to indicate the colon in the key name is mandatory.
You ultimately aren’t in control of a lot of things when you are a consumer of Assistants, though.