-
-
Notifications
You must be signed in to change notification settings - Fork 11.7k
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.33% 92.31% -0.03%
==========================================
Files 647 647
Lines 58526 58553 +27
Branches 4293 4297 +4
==========================================
+ Hits 54042 54054 +12
- Misses 4484 4499 +15
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
💻 变更类型 | 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
已确认可用。