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

[Bug] Render the whole stream response body. #1590

Closed
1 of 3 tasks
sjnho opened this issue May 18, 2023 · 1 comment · Fixed by #1592
Closed
1 of 3 tasks

[Bug] Render the whole stream response body. #1590

sjnho opened this issue May 18, 2023 · 1 comment · Fixed by #1592

Comments

@sjnho
Copy link
Contributor

sjnho commented May 18, 2023

Describe the bug
The assistant response as stream ,but showed whole response body.

To Reproduce
Steps to reproduce the behavior:

  1. Use api2d.com proxy url as openai api baseurl.
  2. Send message Hello.
  3. See error

Expected behavior
The assistant said "Hello! How can I assist you today?" back.

Screenshots
image
Deployment

  • Docker
  • Vercel
  • Server

Additional Logs
Add any logs about the problem here.
image

@sjnho
Copy link
Contributor Author

sjnho commented May 18, 2023

I think the reason is the api2d.com server response with Content-Type : text/event-stream;charset=utf-8. But the type check too strict.
https://github.com/Yidadaa/ChatGPT-Next-Web/blob/f0cb2fc21a8d47864413413f7346ac64b6dec3dc/app/client/platforms/openai.ts#L102 .

Yidadaa added a commit that referenced this issue May 18, 2023
fix #1590 Render the whole stream response body
Jeremy-Hibiki pushed a commit to Jeremy-Hibiki/ChatGPT-Next-Web that referenced this issue Sep 5, 2023
gaogao1030 pushed a commit to gaogao1030/ChatGPT-Next-Web that referenced this issue May 16, 2024
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.

1 participant