From 7f8fb5ccfd81e2b9ab4a7ca8f1667b3d341b406f Mon Sep 17 00:00:00 2001 From: Samuel El-Borai Date: Mon, 12 Aug 2024 19:41:08 +0200 Subject: [PATCH] Fix ChatCompletionChunk to reflect current API behaviour --- openapi.yaml | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/openapi.yaml b/openapi.yaml index 534be73..e02f11a 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -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'