Closed uezo closed 3 months ago
Instantiate GeminiProxy and add route to FastAPI app.
from gemini import GeminiProxy gemini_proxy = GeminiProxy( api_key="YOUR_API_KEY", access_logger_queue=worker.queue_client ) gemini_proxy.add_route(app, "/gemini/v1beta/models/{model}:{method}")
This is a proxy for Google AI Studio, not for Vertex AI.
Official client from Google is not supported because it uses gPRC internally but this proxy handles ordinary HTTP access for RESTful API.
Instantiate GeminiProxy and add route to FastAPI app.
This is a proxy for Google AI Studio, not for Vertex AI.
Official client from Google is not supported because it uses gPRC internally but this proxy handles ordinary HTTP access for RESTful API.