Hey,
so, I might just be stupid but I struggle with building a very simple JSON object schema as a tool.
What I want is this:
{
"name": "Name",
"parameters": {
"type": "object",
"properties": {
"key": {
"type": "object",
"properties": {
"anotherKey": "value"
}
}
}
}
}
But this seems impossible to build with ChatQuery.ChatCompletionToolParam.FunctionDefinition:
let tool = ChatQuery.ChatCompletionToolParam.FunctionDefinition(
name: "name",
parameters: .init(
type: .object,
properties: [
"key": .init(
type: .object,
// cant' use "properties" here, there's just "items", which is technically not allowed
)
]
)
)
Is there a trick to this? Or am I doing something wrong?
Thanks!