Skip to content

Commit

Permalink
Add stream_options param; add usage in ChatCompletionChunk
Browse files Browse the repository at this point in the history
  • Loading branch information
brianz-openai committed May 1, 2024
1 parent 25d9dac commit 0c8df4e
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7212,6 +7212,8 @@ components:
type: boolean
nullable: true
default: false
stream_options:
$ref: "#/components/schemas/ChatCompletionStreamOptions"
suffix:
description: |
The suffix that comes after a completion of inserted text.
Expand Down Expand Up @@ -7697,6 +7699,18 @@ components:
- tool
- function

ChatCompletionStreamOptions:
description: Options for stream response
type: object
nullable: true
default: null
properties:
include_usage:
type: boolean
description: |
If set, an extra chunk will be returned before the `data: [Done]` message with a `usage` field that shows usage data for all chunks in the streamed request.
All other chunks will also include a `usage` field but with a null value. In the case of an error, the extra (usage) chunk might be missing.
ChatCompletionResponseMessage:
type: object
description: A chat completion message generated by the model.
Expand Down Expand Up @@ -7891,6 +7905,8 @@ components:
type: boolean
nullable: true
default: false
stream_options:
$ref: "#/components/schemas/ChatCompletionStreamOptions"
temperature:
type: number
minimum: 0
Expand Down Expand Up @@ -8191,6 +8207,8 @@ components:
type: string
description: The object type, which is always `chat.completion.chunk`.
enum: [chat.completion.chunk]
usage:
$ref: "#/components/schemas/CompletionUsage"
required:
- choices
- created
Expand Down

0 comments on commit 0c8df4e

Please sign in to comment.