We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 69e3bbb commit e8b3478Copy full SHA for e8b3478
chat.go
@@ -225,8 +225,8 @@ const (
225
)
226
227
type Tool struct {
228
- Type ToolType `json:"type"`
229
- Function FunctionDefinition `json:"function,omitempty"`
+ Type ToolType `json:"type"`
+ Function *FunctionDefinition `json:"function,omitempty"`
230
}
231
232
type ToolChoice struct {
examples/completion-with-tool/main.go
@@ -35,7 +35,7 @@ func main() {
35
36
t := openai.Tool{
37
Type: openai.ToolTypeFunction,
38
- Function: f,
+ Function: &f,
39
40
41
// simulate user asking a question that requires the function
0 commit comments