Skip to content

Commit c0fbbb6

Browse files
committed
changed ParallelToolCalls to any
1 parent cc1ea0b commit c0fbbb6

File tree

2 files changed

+2
-30
lines changed

2 files changed

+2
-30
lines changed

chat.go

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -218,18 +218,8 @@ type ChatCompletionRequest struct {
218218
ToolChoice any `json:"tool_choice,omitempty"`
219219
// Options for streaming response. Only set this when you set stream: true.
220220
StreamOptions *StreamOptions `json:"stream_options,omitempty"`
221-
// Disable the default behavior of parallel tool calls.
222-
ParallelToolCalls *bool `json:"parallel_tool_calls,omitempty"`
223-
}
224-
225-
func ParallelOptionFalse() *bool {
226-
b := false
227-
return &b
228-
}
229-
230-
func ParallelOptionTrue() *bool {
231-
b := true
232-
return &b
221+
// Disable the default behavior of parallel tool calls by setting it: false.
222+
ParallelToolCalls any `json:"parallel_tool_calls,omitempty"`
233223
}
234224

235225
type StreamOptions struct {

chat_test.go

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -527,21 +527,3 @@ func TestFinishReason(t *testing.T) {
527527
}
528528
}
529529
}
530-
531-
func TestParallelOption(t *testing.T) {
532-
ccr := openai.ChatCompletionRequest{}
533-
534-
if ccr.ParallelToolCalls != nil {
535-
t.Error("ParallelToolCalls should be default")
536-
}
537-
ccr.ParallelToolCalls = openai.ParallelOptionFalse()
538-
539-
if *ccr.ParallelToolCalls != false {
540-
t.Error("ParallelToolCalls should be false")
541-
}
542-
543-
ccr.ParallelToolCalls = openai.ParallelOptionTrue()
544-
if *ccr.ParallelToolCalls != true {
545-
t.Error("ParallelToolCalls should be true")
546-
}
547-
}

0 commit comments

Comments
 (0)