-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
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
🐛 fix: support Gemini 2.0 HarmBlockThreshold #5422
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 ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5422 +/- ##
=======================================
Coverage 93.10% 93.10%
=======================================
Files 631 631
Lines 55405 55406 +1
Branches 4242 4245 +3
=======================================
+ Hits 51585 51586 +1
Misses 3820 3820
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
❤️ Great PR @sxjeru ❤️ The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world. |
### [Version 1.45.11](v1.45.10...v1.45.11) <sup>Released on **2025-01-14**</sup> #### 🐛 Bug Fixes - **misc**: Support Gemini 2.0 HarmBlockThreshold. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed * **misc**: Support Gemini 2.0 HarmBlockThreshold, closes [#5422](#5422) ([4d1a4cd](4d1a4cd)) </details> <div align="right"> [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) </div>
🎉 This PR is included in version 1.45.11 🎉 The release is available on: Your semantic-release bot 📦🚀 |
### [Version 1.87.7](v1.87.6...v1.87.7) <sup>Released on **2025-01-14**</sup> #### ♻ Code Refactoring - **plugin**: Update plugin prompt. - **misc**: Improve ai provider code. #### 🐛 Bug Fixes - **misc**: Fix `enable_search` parameter intro condition in Qwen, fix pull models error in new ai provider, fix some providers issues, support Gemini 2.0 HarmBlockThreshold. #### 💄 Styles - **misc**: Improve model config form modal. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### Code refactoring * **plugin**: Update plugin prompt, closes [lobehub#5083](https://github.com/bentwnghk/lobe-chat/issues/5083) ([ddd3b53](ddd3b53)) * **misc**: Improve ai provider code, closes [lobehub#5442](https://github.com/bentwnghk/lobe-chat/issues/5442) ([32013b4](32013b4)) #### What's fixed * **misc**: Fix `enable_search` parameter intro condition in Qwen, closes [lobehub#5297](https://github.com/bentwnghk/lobe-chat/issues/5297) ([0b19c20](0b19c20)) * **misc**: Fix pull models error in new ai provider, closes [lobehub#5441](https://github.com/bentwnghk/lobe-chat/issues/5441) ([1726d85](1726d85)) * **misc**: Fix some providers issues, closes [lobehub#5429](https://github.com/bentwnghk/lobe-chat/issues/5429) ([b7edbd3](b7edbd3)) * **misc**: Support Gemini 2.0 HarmBlockThreshold, closes [lobehub#5422](https://github.com/bentwnghk/lobe-chat/issues/5422) ([4d1a4cd](4d1a4cd)) #### Styles * **misc**: Improve model config form modal, closes [lobehub#5438](https://github.com/bentwnghk/lobe-chat/issues/5438) ([9b303e0](9b303e0)) </details> <div align="right"> [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) </div>
这个提交之后,vercel和netlify部署的 gemini-2.0-flash-thinking-exp-1219 模型,不能正常使用了。比如问一下“天空为什么是蓝色的”,回复只有一个单词,如“Thing”、“We”、“Let”,或者回复空白,部署提交之前的版本就正常。 |
After this submission, the gemini-2.0-flash-thinking-exp-1219 model deployed by vercel and netlify cannot be used normally. For example, if you ask "Why is the sky blue?" and the reply is only one word, such as "Thing", "We", "Let", or the reply is blank, the deployment of the version before submission will be normal. |
* Update index.ts * Update index.ts
### [Version 1.45.11](lobehub/lobe-chat@v1.45.10...v1.45.11) <sup>Released on **2025-01-14**</sup> #### 🐛 Bug Fixes - **misc**: Support Gemini 2.0 HarmBlockThreshold. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### What's fixed * **misc**: Support Gemini 2.0 HarmBlockThreshold, closes [lobehub#5422](lobehub#5422) ([4d1a4cd](lobehub@4d1a4cd)) </details> <div align="right"> [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) </div>
💻 变更类型 | Change Type
🔀 变更说明 | Description of Change
根据官方论坛,gemini-2.0-flash 已不再响应
BLOCK_NONE
,而是暂时替换为OFF
。由测试可见,遇到安全风险时,模型会直接截断输出。
📝 补充信息 | Additional Information
这是更改后的效果。