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

OpenAPI spec - /v1/chat/completions stream response schema is different than actual returned response #128

Open
gawi151 opened this issue Aug 21, 2024 · 0 comments

Comments

@gawi151
Copy link

gawi151 commented Aug 21, 2024

Hi, open api spec have wrong response type specified for chat completion as a stream. In docs it's set as CompletionEvent but in reality it should be CompletionChunk.

/v1/chat/completions:
  post:
    summary: Chat Completion
    operationId: chat_completion_v1_chat_completions_post
    requestBody:
      required: true
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/ChatCompletionRequest"
    responses:
      "200":
        description: Successful Response
        content:
          application/json:
            schema: { $ref: "#/components/schemas/ChatCompletionResponse" }
          text/event-stream:
            schema:
              $ref: "#/components/schemas/CompletionEvent" /// Here we should have CompletionChunk

reference spec files:

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

1 participant