-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Gemini的流式返回存在问题 #1408
Comments
+1 似乎是最新版引入的问题,我之前使用是正常的 data: {"id":"","object":"chat.completion.chunk","created":0,"model":"gemini","choices":[{"index":0,"delta":{"content":"我是 Gemini,一个由 Google 开发的多模态 AI 模型。作为一个大型语言"},"finish_reason":"stop"}]}
data: {"id":"","object":"chat.completion.chunk","created":0,"model":"gemini","choices":[{"index":0,"delta":{"content":"模型,我接受了大量文本数据的训练,能够理解和生成人类语言、回答问题并提供信息。我不断学习和完善,致力于提供全面"},"finish_reason":"stop"}]}
data: {"id":"","object":"chat.completion.chunk","created":0,"model":"gemini","choices":[{"index":0,"delta":{"content":"且有帮助的响应。"},"finish_reason":"stop"}]}
data: [DONE] |
这个bug还没修复吗? |
看样子还没有解决,bug状态是open |
回退到 v0.6.6-alpha 可以,但会少一些近期更新的东西。项目维护的人好像很少,更新功能的同时,可能会引入一些 bug。 要么另外开个稳定的 one-api 来过渡,或者接入 litellm、AI-Gateway |
ok 非常感谢~ |
早期的版本应该没有返回FinishReason?所以流不会被截断。 因为是流式返回,没法准确预知哪个是最后一条message,只能暂时去掉FinishReason字段了。#1477 |
您的描述 很有意义,我在尝试把这个 问题 返回给谷歌 ~ 希望会有所答复~ |
例行检查
问题描述
Gemini仅返回几个字,因为它们把"finish_reason":"stop"作为回答停止的信号
如果openai的返回格式是标准的,那Gemini的流式还需要改一下
Gemini的回答,可以看见每一个部分都有stop
GPT的回答,仅最后的一个部分有stop
The text was updated successfully, but these errors were encountered: