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

[Bug] 调用gemini2.0-pro-exp时不能设置系统提示词 #6962

Closed
Coooolfan opened this issue Mar 14, 2025 · 8 comments · Fixed by #6970
Closed

[Bug] 调用gemini2.0-pro-exp时不能设置系统提示词 #6962

Coooolfan opened this issue Mar 14, 2025 · 8 comments · Fixed by #6970
Labels
🐛 Bug Something isn't working | 缺陷 Gemini released

Comments

@Coooolfan
Copy link

📦 Platform

Self hosting Docker

📦 Deploymenet mode

server db(lobe-chat-database image)

📌 Version

1.71.0

💻 Operating System

macOS

🌐 Browser

Edge

🐛 Bug Description

默认助手和自定义助手包含系统提示词时,对gemini2.0-pro-exp的请求会报错:

{
  "error": {
    "message": "[GoogleGenerativeAI Error]: Error fetching from https://******.com/v1beta/models/gemini-2.0-flash-exp:streamGenerateContent?alt=sse: [400 Bad Request] Developer instruction is not enabled for models/gemini-2.0-flash-exp"
  },
  "provider": "google"
}

将提示词调整为空就没事了。只在网上找到一个相关的帖子:https://linux.do/t/topic/490329/74

📷 Recurrence Steps

No response

🚦 Expected Behavior

No response

📝 Additional Information

No response

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

👀 @Coooolfan

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。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

Copy link

dosubot bot commented Mar 14, 2025

Hey @Coooolfan! I'm here to help you with any bugs, questions, or contributions. Let's work on solving this issue together while we wait for a human maintainer.

The issue you're encountering with the gemini2.0-pro-exp model is due to the limited support for Tools Calling capabilities in Google Gemini models. The error message indicates an "Invalid JSON payload" because of unsupported JSON schema properties, such as 'default', in the request payload. When you remove the system prompt words, it likely alters the payload to exclude these unsupported properties, thus resolving the error. To fix this, you should disable plugins and function calls in your implementation [1].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosubot dosubot bot added the Gemini label Mar 14, 2025
@bbbugg
Copy link
Contributor

bbbugg commented Mar 14, 2025

+1

@yuntian123456
Copy link

打开智能联网也会报错=,=

Image

@lobehubbot
Copy link
Member

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


Opening smart networking will also report an error =, =

Image

@arvinxx arvinxx closed this as completed Mar 15, 2025
@github-project-automation github-project-automation bot moved this from Roadmap - Chat 1.x to Done in Lobe Chat Routine Mar 15, 2025
@lobehubbot
Copy link
Member

@Coooolfan

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 1.71.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@Coooolfan
Copy link
Author

@arvinxx 大佬😭 1.71.2 gemini2.0-pro-exp无法调用任何工具,发出带有function call的请求报错:

{
  "error": {
    "message": "[GoogleGenerativeAI Error]: Error fetching from https://******.com/v1beta/models/gemini-2.0-flash-exp:streamGenerateContent?alt=sse: [400 ] Function calling is not enabled for models/gemini-2.0-flash-exp"
  },
  "provider": "google"
}

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

Successfully merging a pull request may close this issue.

5 participants