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

模型选择 Gemini 1.5 ,但是请求地址还是 gemini-pro? #1794

Closed
blueman240328 opened this issue Mar 28, 2024 · 7 comments · Fixed by #1801
Closed

模型选择 Gemini 1.5 ,但是请求地址还是 gemini-pro? #1794

blueman240328 opened this issue Mar 28, 2024 · 7 comments · Fixed by #1801
Labels
🐛 Bug Something isn't working | 缺陷 released

Comments

@blueman240328
Copy link

💻 系统环境

Windows

📦 部署环境

Vercel / Zeabur / Sealos

🌐 浏览器

Chrome

🐛 问题描述

模型选择 Gemini 1.5 或 Gemini ultra, 但是错误信息是从 gemini-pro 返回的,这是不是可以认为并没有成功请求到 gemini-1.5-pro-latest. (已确认 api 有 1.5 和 ultra 的调用权限)

image_2024-03-28_23-24-51

{
  "error": {
    "message": "[GoogleGenerativeAI Error]: Error fetching from https://generativelanguage.googleapis.com/v1/models/gemini-pro:streamGenerateContent?alt=sse: [400 Bad Request] Please ensure that multiturn requests ends with a user role or a function response."
  },
  "provider": "google"
}

🚦 期望结果

如果选择的 gemini-pro-vision ,那么错误信息就是从 /models/gemini-pro-vision 返回的,据此推断如果正常请求 gemini-1.5-pro-latest,那么错误信息也会从 /models/gemini-1.5-pro-latest 返回。

image

📷 复现步骤

根据错误信息, gemini 的对话必须从 user role 开始,那么如果把历史消息数限制在双数,就会返回上述错误,根据返回的错误信息,发现是从 /models/gemini-pro 的请求地址返回的,并不是选择的 /models/gemini-1.5-pro-latest 的地址返回

📝 补充信息

No response

@blueman240328 blueman240328 added the 🐛 Bug Something isn't working | 缺陷 label Mar 28, 2024
@github-project-automation github-project-automation bot moved this to Roadmap - Chat 1.x in Lobe Chat Routine Mar 28, 2024
@lobehubbot
Copy link
Member

👀 @blueman240328

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible.
非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

@xaya1001
Copy link

#1284 (comment)
来这里投票吧,希望能更新一下

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


#1284 (comment)
Come here to vote, I hope it will be updated

@blueman240328
Copy link
Author

#1769 (comment)

@arvinxx
Copy link
Contributor

arvinxx commented Mar 28, 2024

写了下 RFC: #1796

@lobehubbot
Copy link
Member

@blueman240328

This issue is closed, If you have any questions, you can comment and reply.
此问题已经关闭。如果您有任何问题,可以留言并回复。

@lobehubbot
Copy link
Member

🎉 This issue has been resolved in version 0.145.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working | 缺陷 released
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants