Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Server-sent events response type to createChatCompletion #197

Open
atacan opened this issue Feb 18, 2024 · 0 comments
Open

Add Server-sent events response type to createChatCompletion #197

atacan opened this issue Feb 18, 2024 · 0 comments

Comments

@atacan
Copy link

atacan commented Feb 18, 2024

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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@atacan and others