songquanpeng / one-api

OpenAI 接口管理 & 分发系统,支持 Azure、Anthropic Claude、Google PaLM 2 & Gemini、智谱 ChatGLM、百度文心一言、讯飞星火认知、阿里通义千问、360 智脑以及腾讯混元,可用于二次分发管理 key,仅单可执行文件,已打包好 Docker 镜像,一键部署,开箱即用. OpenAI key management & redistribution system, using a single API for all LLMs, and features an English UI.
https://openai.justsong.cn/
MIT License
17.48k stars 3.98k forks source link

Gemini Pro请求问题 #857

Open jsxupeng opened 8 months ago

jsxupeng commented 8 months ago

stdout: [INFO] 2023/12/22 - 11:02:01 | 20231222110201530406978YXmSmp6T | user 1 has enough quota 9999752397, trusted and no need to pre-consume stderr: [ERR] 2023/12/22 - 11:02:02 | 20231222110201530406978YXmSmp6T | relay error (channel #59): * GenerateContentRequest.contents[0].parts[0].data: required oneof field 'data' must have one initialized field

songquanpeng commented 7 months ago

什么版本呢?什么请求参数呢?还能复现吗?

2catycm commented 7 months ago

image release中的最新版本可以复现

2catycm commented 7 months ago

其他应用配置如下: image 我的OneAPI配置如下: image

为什么说是bug在gemini? 因为我只要把应用中用的model换成 gpt-3.5-turbo, oneapi正常工作,应用可以调用oneapi成功 而只是把模型名字换为gemini-pro,就会出现400错误

2catycm commented 7 months ago

而使用google官方的sdk可以正常请求