-
Notifications
You must be signed in to change notification settings - Fork 505
Closed
Description
Is your feature request related to a problem? Please describe.
If I am understanding correctly, I cannot currently express the following type of function call:
let nestedParamsFunc = ChatQuery.ChatCompletionToolParam(function: .init(
name: "nestedParamsFunc",
parameters: .init(
type: .object,
properties: [
"nestedParam": .init(
type: .object,
properties: [
"param1": .init(type: .string),
"param2": .init(type: .string),
]
)
]
)
))
From the JSON spec and from testing this type of parameter nesting is supported by OpenAI.
Describe the solution you'd like
Support for the above.
Describe alternatives you've considered
The current alternative is to manually add all the fields of the object as separate properties on the parent, e.g:
let unNestedParamsFunc = ChatQuery.ChatCompletionToolParam(function: .init(
name: "nestedParamsFunc",
parameters: .init(
type: .object,
properties: [
"nestedParam1": .init(type: .string),
"nestedParam2": .init(type: .string),
]
)
))
Additional context
Add any other context or screenshots about the feature request here.
longseespace
Metadata
Metadata
Assignees
Labels
No labels