I’m not sure if this is down to an issue with the support libraries or (as I suspect) the model is not returning at least one value, or possibly a combination of both.
A few things to try would be:
Show the model an example of a correct reply and ask it to use that as a template.
Tell the model to respect minItems = 1 is positive language i.e. use “do this” not “don’t do this”
do not process the returned data right away, instead post process it with traditional software to correct any known errant behaviour with string manipulation.
The functions you construct are not passed to AI as a particular JSON type. It only knows to make JSON outputs (which are easily interpreted as python dictionaries) by the fine tunings that have informed the function-calling mechanism.
You seem to be passing keys and values that the API will just ignore when it constructs the language the AI sees.
You write a function, and what does the API look for and use at each nesting level?
Function
name
description
parameters
Parameters
type (no examples documented other than “object”)
required (parameters that must be returned)
parameters by name
Parameters by name
type (string, and possibly int, float, boolean)
description
Expect for each parameter the AI to only see:
– description
name (type)
Nothing else is going to be seen by the AI. If you try to make a second level of parameters, names better be good because there is no description passed either.
Your game descriptions are very terse. My intelligence is not so artificial, and I still wouldn’t know what value goes in “a move” unless we are playing battleship.
You write a function, and what does the API look for and use at each nesting level?
Function
name
description
parameters
Parameters
type (no examples documented other than “object”)
required (parameters that must be returned)
parameters by name
Parameters by name
type (string, and possibly int, float, boolean)
description
Expect for each parameter the AI to only see:
– description
name (type)
Do you mean that arrays and their specifications are ignored? In the JSON schema in the above GitHub Gist, "moves" represents an array that specifies "items" and "minItems":
Nothing else is going to be seen by the AI. If you try to make a second level of parameters, names better be good because there is no description passed either.