-
-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
💄 style: Enable Grounding with Google Search for Gemini 2.0 #5778
base: main
Are you sure you want to change the base?
Conversation
@sxjeru is attempting to deploy a commit to the LobeHub Team on Vercel. A member of the Team first needs to authorize it. |
👍 @sxjeru Thank you for raising your pull request and contributing to our Community |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5778 +/- ##
==========================================
- Coverage 92.44% 92.42% -0.03%
==========================================
Files 661 661
Lines 59965 59992 +27
Branches 2824 4402 +1578
==========================================
+ Hits 55434 55445 +11
- Misses 4531 4547 +16
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
非常好的PR,我有如下疑问:如果我使用oneapi转发并重命名了我的Gemini模型,该环境变量是否仍然有效? |
Very good PR, I have the following question: If I forward and rename my Gemini model using oneapi, is this environment variable still valid? |
这样就不起作用了,只能是直接在 lobechat 配置 gemini 时有用。 |
This won't work, it can only be useful directly when configuring gemini in lobechat. |
💻 变更类型 | Change Type
🔀 变更说明 | Description of Change
https://ai.google.dev/gemini-api/docs/grounding
Gemini 2.0 模型拥有每日免费 500 次搜索请求配额。
在 #5431 按钮功能实现前,只能是不太灵活的环境变量来禁用该功能。(避免收费)
GEMINI_SEARCH_ENABLED
设为 1 则启用搜索功能,由于该功能可能收费,默认禁用。参考文档,模型可以自动在合适的时机启用搜索,避免浪费配额,应当可以将 Grounding 搜索设为默认启用。注意启用的是只有 Gemini 2.0 模型才可享受的 googleSearch,1.5 系列与之无关。
根据测试,Grounding 暂时无法和 functionCall 共存,启用 functionCall 时会自动关闭 Grounding 搜索。
📝 补充信息 | Additional Information
已确认可用。