Installation
Usage
Vertex AI
Gemini को Google AI Studio की बजाय Vertex AI से use करने के लिएuse_vertex=True pass करें:
Vertex AI Application Default Credentials use करता है।
gcloud auth application-default login run करें या GOOGLE_APPLICATION_CREDENTIALS को अपनी service account key file पर set करें।Configuration options
| Parameter | Type | Default | Description |
|---|---|---|---|
google_api_key | str | — | Google AI Studio API key (use_vertex=True होने पर ज़रूरी नहीं) |
rail_api_key | str | — | आपकी RAIL API key |
rail_threshold | float | None | इस score से नीचे block या regenerate करें |
rail_policy | str | "log_only" | "log_only" | "block" | "regenerate" |
rail_mode | str | "basic" | "basic" | "deep" |
use_vertex | bool | False | Google AI Studio की बजाय Vertex AI use करें |
gcp_project | str | — | GCP project ID (use_vertex=True होने पर ज़रूरी) |
gcp_region | str | "us-central1" | Vertex AI region |
आगे क्या देखें
OpenAI Integration
Chat completions के लिए RAILOpenAI wrapper।
Anthropic Integration
Claude के लिए RAILAnthropic wrapper।
Concepts: Middleware
Provider wrappers internally कैसे काम करते हैं।
Python SDK Overview
Full Python SDK installation और reference।