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

Malformed request body example in Swagger docs for Chat Completion endpoint #276

Closed
teslashibe opened this issue May 21, 2024 · 1 comment · Fixed by #282
Closed

Malformed request body example in Swagger docs for Chat Completion endpoint #276

teslashibe opened this issue May 21, 2024 · 1 comment · Fixed by #282
Assignees

Comments

@teslashibe
Copy link
Contributor

Description:
The request body example shown in the Swagger documentation for the Chat Completion API endpoint appears to be malformed JSON. Specifically:

  • The opening and closing curly braces are missing for the JSON object
  • The "Content-Type" header is included directly in the request body instead of in the headers section
  • The "text" field is missing a value

This looks to be an issue with how the Swagger docs are being automatically generated from the API definition.

Steps to Reproduce:

  1. Open the Swagger documentation page
  2. Navigate to the Chat Completion endpoint
  3. Expand the example request body

Expected Result:
The example request body should be properly formatted JSON, with the Content-Type specified in the headers section.

Actual Result:
The request body is malformed and would result in an invalid API request.

Priority: Medium

Assignee: Bob Stevens

@restevens402 - Could you please take a look at this when you have a chance? It seems like it should be a straightforward fix to update the API definition file to generate a correct example in the Swagger UI. Let me know if you have any questions. Thanks!

@restevens402
Copy link
Contributor

I have updated the swagger docs and opened a PR which is associated with this ticket.

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

Successfully merging a pull request may close this issue.

2 participants