Closed happychos closed 6 months ago
Bot detected the issue body's language is not English, translate it automatically.
Title: Gemini-Pro changed to streaming response and is unavailable after update
In order to improve communication efficiency, we have set up an official QQ group and QQ channel. If you encounter any problems during use or construction, please join the group or channel for consultation as soon as possible, unless it is a bug that can be stably reproduced or More creative feature suggestions, otherwise please do not send low-quality and meaningless posts to the Issue area.
Feedback Instructions
⚠️ NOTE: Any post that does not follow this template will be immediately closed and we will not be able to locate your issue without providing the information below.
Please enter x in the square brackets below to indicate that you already know the relevant content.
Describe the problem The google_api_key used, other models use one-api, Gemini-Pro is changed to streaming response and is unavailable after the update. There is no problem if the same parameters are rolled back to the previous version.
How to reproduce After the update, it was found that gemini-pro was not available, but it was available after rolling back.
screenshot Please provide console screenshots, screenshots, or server-side log screenshots here.
Some necessary information
+1,测试接口
curl \
-H 'Content-Type: application/json' \
-d '{"contents":[{"parts":[{"text":"say hello~"}]}]}' \
-X POST https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:streamGenerateContent\?key\=key
可用,部署后没用
Bot detected the issue body's language is not English, translate it automatically.
+1, test interface
curl\ -H 'Content-Type: application/json' \ -d '{"contents":[{"parts":[{"text":"say hello~"}]}]}' \ -X POST https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:streamGenerateContent\?key\=key
Available, useless after deployment
是否配置了 GOOGLE_BASE_URL
对应原版参数为 GOOGLE_URL
原版需要配置为 https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:streamGenerateContent
本项目配置为 https://generativelanguage.googleapis.com
此处存在差异,检查一下配置是否正确
Bot detected the issue body's language is not English, translate it automatically.
Whether
GOOGLE_BASE_URL
is configured, the corresponding original parameter isGOOGLE_URL
The original version needs to be configured ashttps://generativelanguage.googleapis.com/v1beta/models/gemini-pro:streamGenerateContent
This project is configured ashttps://generativelanguage.googleapis.com
There are differences here, check if the configuration is correct
谢谢作者,辛苦您啦 我确认了下Server的log显示
[Base Url] https://generativelanguage.googleapis.com
[Server Config] using 1 of 1 api key
然后 网站的log显示
[30/Dec/2023:00:31:30 +0800] "POST /api/google/v1/models/gemini-pro:streamGenerateContent HTTP/2.0" 401 40
是否配置了
GOOGLE_BASE_URL
对应原版参数为GOOGLE_URL
原版需要配置为https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:streamGenerateContent
本项目配置为https://generativelanguage.googleapis.com
此处存在差异,检查一下配置是否正确
我试了加了GOOGLE_BASE_URL还是不行,但是去掉CODE参数就一切正常了,加了CODE gemini pro就不可用,但是其他模型可用。
Bot detected the issue body's language is not English, translate it automatically.
Whether
GOOGLE_BASE_URL
is configured, the corresponding original parameter isGOOGLE_URL
The original version needs to be configured ashttps://generativelanguage.googleapis.com/v1beta/models/gemini-pro:streamGenerateContent
This project is configured ashttps://generativelanguage.googleapis.com
There are differences here, check whether the configuration is correct
I tried adding GOOGLE_BASE_URL but it still didn't work, but removing the CODE parameter made everything normal.
[Base Url] https://generativelanguage.googleapis.com
我试了一下 确实是 gemini 模型鉴权的问题,该问题很快会被修复
Bot detected the issue body's language is not English, translate it automatically.
[Base Url] https://generativelanguage.googleapis.com
I tried it and it is indeed a gemini model authentication problem. This problem will be fixed soon.
反馈须知
⚠️ 注意:不遵循此模板的任何帖子都会被立即关闭,如果没有提供下方的信息,我们无法定位你的问题。
请在下方中括号内输入 x 来表示你已经知晓相关内容。
描述问题 使用的google_api_key,其他模型用one-api,Gemini-Pro改为流式响应更新后不可用,同样的参数回滚到上一个版本就没有问题,
如何复现 更新后发现gemini-pro不可用,回滚后可用。
截图 请在此提供控制台截图、屏幕截图或者服务端的 log 截图。
一些必要的信息