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

尝试修复火山方舟的联网应用响应格式不标准导致无输出内容的情况 #2114

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

sijinhui
Copy link

close #2109

我已确认该 PR 已自测通过,相关截图如下:
(此处放上测试通过的截图,如果不涉及前端改动或从 UI 上无法看出,请放终端启动成功的截图)

@i-square
Copy link

i-square commented Feb 20, 2025

这个是个老问题了,之前也有些issue提出,不过都被忽略了,比如:#1539#1739#2109

实际上就是因为one-api的OpenAI渠道,需要流式SSE的data:后面有个空格,因为官方openai的返回(或者大部分厂商)都是这样的,但这只是约定俗成并不是SSE的标准(标准只需要data:开头,后面加不加空格,加几个空格都是可以的)

@songquanpeng 建议作者考虑一下这个问题

@sijinhui 我看你的方式稍显粗暴,或许把prefix改成data:trim一下空格可能更符合原本的设计一些,代码里好像还有个地方也会做类似校验来着一下子忘了

@sijinhui
Copy link
Author

@i-square 这里结合原有的判断逻辑修改了一下,您看是否合适

@i-square
Copy link

@i-square 这里结合原有的判断逻辑修改了一下,您看是否合适

😂 我不是项目的reviewer,只是看到顺便提了下,我觉得可能要作者考虑改不改,毕竟之前的相关issue也没有处理

@seven-yu
Copy link
Contributor

+1

1 similar comment
@walimaker
Copy link

+1

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 this pull request may close these issues.

能否对火山方舟的应用提供支持?
4 participants