tools=[
{
"name": "get_weather",
"type": "function",
"parameters": {
"type": "object",
"properties": {
"location": {"type": "string"},
"unit": {"type": "string", "enum": ["c", "f"]},
},
"required": ["location", "unit"],
"additionalProperties": False,
},
}
]
This is the only format that works. The various other formats in the Functions Calling docs such as the one below, do not work.
tools = [
{
"type": "function",
"function": {
"name": "get_weather",
"strict": True,
"parameters": {
"type": "object",
"properties": {
"location": {"type": "string"},
"unit": {"type": "string", "enum": ["c", "f"]},
},
"required": ["location", "unit"],
"additionalProperties": False,
},
},
}
]
using the strict tag gives an error, which is the part I don’t love. Not being sure that you’ll get the expected structure is a bit worrisome. Any workarounds? or plans to fix?