Skip to content

Commit 38c9c20

Browse files
Merge pull request #246 from openai/revert-244-revert-242-brianz/cc-tool-choice-required
Add required as an option for tool_choice in chat/completions api
2 parents a6aadda + 2954f15 commit 38c9c20

File tree

1 file changed

+19
-15
lines changed

1 file changed

+19
-15
lines changed

openapi.yaml

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6731,7 +6731,7 @@ paths:
67316731
}
67326732
}
67336733
6734-
main();
6734+
main();
67356735
response: |
67366736
{
67376737
"object": "list",
@@ -6818,7 +6818,7 @@ paths:
68186818
console.log(batch);
68196819
}
68206820
6821-
main();
6821+
main();
68226822
response: &batch_object |
68236823
{
68246824
"id": "batch_abc123",
@@ -6897,7 +6897,7 @@ paths:
68976897
console.log(batch);
68986898
}
68996899
6900-
main();
6900+
main();
69016901
response: |
69026902
{
69036903
"id": "batch_abc123",
@@ -7523,18 +7523,20 @@ components:
75237523

75247524
ChatCompletionToolChoiceOption:
75257525
description: |
7526-
Controls which (if any) function is called by the model.
7527-
`none` means the model will not call a function and instead generates a message.
7528-
`auto` means the model can pick between generating a message or calling a function.
7529-
Specifying a particular function via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that function.
7526+
Controls which (if any) tool is called by the model.
7527+
`none` means the model will not call any tool and instead generates a message.
7528+
`auto` means the model can pick between generating a message or calling one or more tools.
7529+
`required` means the model must call one or more tools.
7530+
Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool.
75307531
7531-
`none` is the default when no functions are present. `auto` is the default if functions are present.
7532+
`none` is the default when no tools are present. `auto` is the default if tools are present.
75327533
oneOf:
75337534
- type: string
75347535
description: >
7535-
`none` means the model will not call a function and instead generates a message.
7536-
`auto` means the model can pick between generating a message or calling a function.
7537-
enum: [none, auto]
7536+
`none` means the model will not call any tool and instead generates a message.
7537+
`auto` means the model can pick between generating a message or calling one or more tools.
7538+
`required` means the model must call one or more tools.
7539+
enum: [none, auto, required]
75387540
- $ref: "#/components/schemas/ChatCompletionNamedToolChoice"
75397541
x-oaiExpandable: true
75407542

@@ -10001,15 +10003,17 @@ components:
1000110003
description: |
1000210004
Controls which (if any) tool is called by the model.
1000310005
`none` means the model will not call any tools and instead generates a message.
10004-
`auto` is the default value and means the model can pick between generating a message or calling a tool.
10006+
`auto` is the default value and means the model can pick between generating a message or calling one or more tools.
10007+
`required` means the model must call one or more tools before responding to the user.
1000510008
Specifying a particular tool like `{"type": "file_search"}` or `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool.
1000610009
1000710010
oneOf:
1000810011
- type: string
1000910012
description: >
10010-
`none` means the model will not call a function and instead generates a message.
10011-
`auto` means the model can pick between generating a message or calling a function.
10012-
enum: [none, auto]
10013+
`none` means the model will not call any tools and instead generates a message.
10014+
`auto` means the model can pick between generating a message or calling one or more tools.
10015+
`required` means the model must call one or more tools before responding to the user.
10016+
enum: [none, auto, required]
1001310017
- $ref: "#/components/schemas/AssistantsNamedToolChoice"
1001410018
x-oaiExpandable: true
1001510019

0 commit comments

Comments
 (0)