Gemini API Rotation Pipe

The pipeline implementation for interacting with the Google Gemini API. It allows you to easily send prompts, receive responses, and manage your API keys. Crucially, it includes support for API key rotation, enabling you to seamlessly switch between multiple Gemini API keys for improved reliability, rate limiting management, and key security. This is a robust and feature-rich solution for developers building applications that utilize Google's Gemini models.

v1.0.1
gemini_api_rotation_pipe.py
Python · 663 lines
27    class Valves(BaseModel):28        GOOGLE_API_KEY: str = Field(default="")29        USE_PERMISSIVE_SAFETY: bool = Field(default=False)30 31    def __init__(self):32        try:33            self.id = "google_genai"34            self.type = "manifold"  # Indicates this pipe provides multiple models35            self.name = "Google: "36            self.valves = self.Valves(37                **{38                    "GOOGLE_API_KEY": os.getenv("GOOGLE_API_KEY", ""),

The pipeline implementation for interacting with the Google Gemini API. It allows you to easily send prompts, receive responses, and manage your API keys. Crucially, it includes support for API key rotation, enabling you to seamlessly switch between multiple Gemini API keys for improved reliability, rate limiting management, and key security. This is a robust and feature-rich solution for developers building applications that utilize Google's Gemini models.

0
0

The pipeline implementation for interacting with the Google Gemini API. It allows you to easily send prompts, receive responses, and manage your API keys. Crucially, it includes support for API key rotation, enabling you to seamlessly switch between multiple Gemini API keys for improved reliability, rate limiting management, and key security. This is a robust and feature-rich solution for developers building applications that utilize Google's Gemini models.

0
0