openai-openapi
openai-openapi copied to clipboard
Add Server-sent events response type to `createChatCompletion`
In the createChatCompletion operation there is only json as response type. However the same endpoint returns event stream when the request is created with stream = true
Because of this openapi-based code generators do not handle SSE response.
Adding text/event-stream to the response types, will help using the schema without additional effort.
Current file:
/chat/completions:
post:
operationId: createChatCompletion
tags:
- Chat
summary: Creates a model response for the given chat conversation.
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CreateChatCompletionRequest"
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/CreateChatCompletionResponse"