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

Lobe Chat 里无法使用Google Gemini 提示 Invalid URL #1410

Open
FernandoFan opened this issue May 5, 2024 · 11 comments
Open

Lobe Chat 里无法使用Google Gemini 提示 Invalid URL #1410

FernandoFan opened this issue May 5, 2024 · 11 comments
Labels
bug Something isn't working

Comments

@FernandoFan
Copy link

FernandoFan commented May 5, 2024

例行检查

  • [ x] 我已确认目前没有类似 issue
  • [ x] 我已确认我已升级到最新版本 v0.153.1
  • [x ] 我已完整查看过项目 README,尤其是常见问题部分
  • [ x] 我理解并愿意跟进此 issue,协助测试和提供反馈
  • [ x] 我理解并认可上述内容,并理解项目维护者精力有限,不遵循规则的 issue 可能会被无视或直接关闭

问题描述
我是使用one-api + lobehub
在使用lobehub时,使用openai是正常的,但是当我使用google gimini时候提示以下信息

{
"error": {
"message": "[GoogleGenerativeAI Error]: Error fetching from https://easyapi.live/v1beta/models/gemini-1.0-pro-001:streamGenerateContent?alt=sse: [404 ] Invalid URL (POST /v1beta/models/gemini-1.0-pro-001:streamGenerateContent)"
},
"provider": "google"
}

复现步骤
我设置了所有gemini的模型都不行
如果使用gemini官方api地址没有问题,但是若使用one-api的就不行(在one-api里面已经测试并且显示渠道测试成功)

预期结果
能正常的流式输出
相关截图
如果没有的话,请删除此节。

@FernandoFan FernandoFan added the bug Something isn't working label May 5, 2024
@FernandoFan FernandoFan changed the title LobeHUB LobeHUB 里无法使用Google Gemini 提示 Invalid URL May 5, 2024
@FernandoFan FernandoFan changed the title LobeHUB 里无法使用Google Gemini 提示 Invalid URL Lobe Chat 里无法使用Google Gemini 提示 Invalid URL May 5, 2024
@QAbot-zh
Copy link

QAbot-zh commented May 5, 2024

经过 oneapi 中转后都成 OpenAI 类型了,调用什么模型,就在 OpenAI 类型里添加对应的模型名称就好

image

@FernandoFan
Copy link
Author

经过 oneapi 中转后都成 OpenAI 类型了,调用什么模型,就在 OpenAI 类型里添加对应的模型名称就好

image

感谢可以使用了,希望官方能把这个放进说明文档里
image

@Numb94
Copy link

Numb94 commented May 7, 2024

image
我也是按这个配置的,怎么不行呢
image
image

@QAbot-zh
Copy link

QAbot-zh commented May 7, 2024

你是默认主题,要设置一下gemini版本,通过环境变量设置为 v1beta

image

berry 主题可以直接在渠道里设置
image

@Numb94
Copy link

Numb94 commented May 7, 2024

image
image
我这边启用了也不行

@QAbot-zh
Copy link

QAbot-zh commented May 7, 2024

那是不是你部署的地区ip被屏蔽了?

@Numb94
Copy link

Numb94 commented May 7, 2024

image
image
直接在这里面使用是可以的

@QAbot-zh
Copy link

QAbot-zh commented May 7, 2024

你 oneapi 和 lobechat 是同一个服务器吗?

@Numb94
Copy link

Numb94 commented May 7, 2024

是同一个服务器,并且我在服务器用curl也能通,都是通过我的代理地址去请求的

@QAbot-zh
Copy link

QAbot-zh commented May 7, 2024

那有点神奇了,oneapi 的 docker 日志里有什么错误提示吗

@Numb94
Copy link

Numb94 commented May 7, 2024

image
这个错误,
配置了倍率后
image
image
第一次返回空,后面就报错了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants