Skip to content

Commit

Permalink
Merge pull request #27 from dgellow/sam/fix-chat-completion-streaming…
Browse files Browse the repository at this point in the history
…-response

Fix ChatCompletionChunk to reflect current API behaviour
  • Loading branch information
Nutlope authored Aug 15, 2024
2 parents 9ed48f3 + 7f8fb5c commit 6a65619
Showing 1 changed file with 39 additions and 1 deletion.
40 changes: 39 additions & 1 deletion openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,45 @@ components:
title: ChatCompletionChoices
type: array
items:
$ref: '#/components/schemas/ChatCompletionChoice'
type: object
required: [index, delta, finish_reason]
properties:
index:
type: integer
finish_reason:
$ref: '#/components/schemas/FinishReason'
logprobs:
type: number
nullable: true
delta:
title: ChatCompletionChoiceDelta
type: object
required: [role]
properties:
token_id:
type: integer
role:
type: string
enum: ['system', 'user', 'assistant', 'function', 'tool']
content:
type: string
nullable: true
tool_calls:
type: array
items:
$ref: '#/components/schemas/ToolChoice'
function_call:
type: object
deprecated: true
nullable: true
properties:
arguments:
type: string
name:
type: string
required:
- arguments
- name
usage:
allOf:
- $ref: '#/components/schemas/UsageData'
Expand Down

0 comments on commit 6a65619

Please sign in to comment.