kkoolldd
@kkoolldd
·
a year ago
Disable gemini content safety setting for OpenAI API and OpenRouter
Last Updated
a year ago
Created
a year ago
Function
filter
v0.1.0
Name
Disable gemini content safety setting for OpenAI API and OpenRouter
Downloads
272+
Saves
1+
Description
This Filter function modifies the request payload for Google Gemini models to disable content safety filters. It adds the 'safety_settings' parameter to the request body with all harm categories set to 'BLOCK_NONE'. This is intended for use cases where Gemini's default filtering is overly restrictive. Use responsibly. Note: This function identifies Gemini models by checking if the model ID starts with 'google/gemini'. This might need adjustment depending on how your specific backend (e.g., OpenRouter, Ollama with LiteLLM Proxy) names the Gemini models.

This Filter function modifies the request payload for Google Gemini models to disable content safety filters. It adds the 'safety_settings' parameter to the request body with all harm categories set to 'BLOCK_NONE'. This is intended for use cases where Gemini's default filtering is overly restrictive. Use responsibly. Note: This function identifies Gemini models by checking if the model ID starts with 'google/gemini'. This might need adjustment depending on how your specific backend (e.g., OpenRouter, Ollama with LiteLLM Proxy) names the Gemini models.


1