[PR #1466] [MERGED] Allow setting of safety thresholds for Gemini #3689

Closed
opened 2026-02-22 18:34:17 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Mintplex-Labs/anything-llm/pull/1466
Author: @timothycarambat
Created: 5/20/2024
Status: Merged
Merged: 5/20/2024
Merged by: @timothycarambat

Base: masterHead: 1465-gemini-safety


📝 Commits (2)

  • 99d20a2 Allow setting of safety thresholds for Gemini
  • ab8b85c linting

📊 Changes

4 files changed (+97 additions, -19 deletions)

View changed files

📝 frontend/src/components/LLMSelection/GeminiLLMOptions/index.jsx (+41 -19)
📝 server/models/systemSettings.js (+2 -0)
📝 server/utils/AiProviders/gemini/index.js (+38 -0)
📝 server/utils/helpers/updateENV.js (+16 -0)

📄 Description

Pull Request Type

  • feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 🔨 chore
  • 📝 docs

Relevant Issues

resolves #1465
resolves #1348

What is in this change?

Allow user to specify safety setting while interacting with the Gemini API.

Note: The BLOCK_NONE threshold can be restricted on some accounts
https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/configure-safety-attributes#how_to_remove_automated_response_blocking_for_select_safety_attributes

Additional Information

Developer Validations

  • I ran yarn lint from the root of the repo & committed changes
  • Relevant documentation has been updated
  • I have tested my code functionality
  • Docker build succeeds locally

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Mintplex-Labs/anything-llm/pull/1466 **Author:** [@timothycarambat](https://github.com/timothycarambat) **Created:** 5/20/2024 **Status:** ✅ Merged **Merged:** 5/20/2024 **Merged by:** [@timothycarambat](https://github.com/timothycarambat) **Base:** `master` ← **Head:** `1465-gemini-safety` --- ### 📝 Commits (2) - [`99d20a2`](https://github.com/Mintplex-Labs/anything-llm/commit/99d20a2a2a3e8711ef290f286372841d59a0cf25) Allow setting of safety thresholds for Gemini - [`ab8b85c`](https://github.com/Mintplex-Labs/anything-llm/commit/ab8b85cd25f574f97e728998388287effbf16bfa) linting ### 📊 Changes **4 files changed** (+97 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/components/LLMSelection/GeminiLLMOptions/index.jsx` (+41 -19) 📝 `server/models/systemSettings.js` (+2 -0) 📝 `server/utils/AiProviders/gemini/index.js` (+38 -0) 📝 `server/utils/helpers/updateENV.js` (+16 -0) </details> ### 📄 Description ### Pull Request Type <!-- For change type, change [ ] to [x]. --> - [x] ✨ feat - [ ] 🐛 fix - [ ] ♻️ refactor - [ ] 💄 style - [ ] 🔨 chore - [ ] 📝 docs ### Relevant Issues <!-- Use "resolves #xxx" to auto resolve on merge. Otherwise, please use "connect #xxx" --> resolves #1465 resolves #1348 ### What is in this change? Allow user to specify safety setting while interacting with the Gemini API. **Note:** The `BLOCK_NONE` threshold can be restricted on some accounts https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/configure-safety-attributes#how_to_remove_automated_response_blocking_for_select_safety_attributes ### Additional Information <!-- Add any other context about the Pull Request here that was not captured above. --> ### Developer Validations <!-- All of the applicable items should be checked. --> - [x] I ran `yarn lint` from the root of the repo & committed changes - [x] Relevant documentation has been updated - [x] I have tested my code functionality - [x] Docker build succeeds locally --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-22 18:34:17 -05:00
yindo closed this issue 2026-02-22 18:34:18 -05:00
yindo changed title from [PR #1466] Allow setting of safety thresholds for Gemini to [PR #1466] [MERGED] Allow setting of safety thresholds for Gemini 2026-06-05 15:14:43 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#3689