Skip to content

Commit b060f6d

Browse files
authored
Merge pull request openai#88 from rattrayalex/patch-6
fix: add content_filter and function_call to finish_reason
2 parents 4f3366c + 02152fd commit b060f6d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

openapi.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2508,8 +2508,9 @@ components:
25082508
type: string
25092509
description: &completion_finish_reason_description |
25102510
The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,
2511-
or `length` if the maximum number of tokens specified in the request was reached.
2512-
enum: ["stop", "length"]
2511+
`length` if the maximum number of tokens specified in the request was reached,
2512+
or `content_filter` if content was omitted due to a flag from our content filters.
2513+
enum: ["stop", "length", "content_filter"]
25132514
usage:
25142515
$ref: "#/components/schemas/CompletionUsage"
25152516
required:
@@ -2813,8 +2814,10 @@ components:
28132814
type: string
28142815
description: &chat_completion_finish_reason_description |
28152816
The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,
2816-
`length` if the maximum number of tokens specified in the request was reached, or `function_call` if the model called a function.
2817-
enum: ["stop", "length", "function_call"]
2817+
`length` if the maximum number of tokens specified in the request was reached,
2818+
`content_filter` if content was omitted due to a flag from our content filters,
2819+
or `function_call` if the model called a function.
2820+
enum: ["stop", "length", "function_call", "content_filter"]
28182821
usage:
28192822
$ref: "#/components/schemas/CompletionUsage"
28202823
required:

0 commit comments

Comments
 (0)