| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Genstack SDK Host is a FastAPI-based backend service that acts as a secure, multi-provider LLM (Large Language Model) gateway. It enables unified, authenticated, and auditable access to models from OpenAI, Google Gemini, and Anthropic, with robust tracking, encryption, and extensibility.
flowchart TD
Client["Client (SDK/HTTP)"]
API["FastAPI Server"]
Router["Router (Provider Logic)"]
Redis["Upstash Redis (Cache/Keys/Tracks)"]
Providers["LLM Providers (OpenAI, Gemini, Anthropic)"]
Firestore["Firestore (Persistent Usage Tracking)"]
Client -->|HTTP POST /api/v1/sdk/generate| API
API --> Router
Router --> Redis
Router -->|API Call| Providers
Router --> Firestore
Example (app/schemas/request.json):
{
"model": "gemini-2-5-pro-ggl",
"config": {
"streaming": false,
"think": true,
"tools": [""]
},
"messages": [
{"role": "user", "content": "Hi! How are you doing?"}
]
}Example (app/schemas/response.json):
{
"data": "something"
}Note: Actual response structure may vary by provider and model. See Formatter for details.
# Install dependencies
python -m venv env
env\Scripts\activate
pip install -r requirements.txt
# Set up .env (see below)
# Run the server
runserver.batcurl -X POST http://localhost:8000/api/v1/sdk/generate \
-H "x-api-key: <your-api-key>" \
-H "Content-Type: application/json" \
-d @app/schemas/request.jsonCreate a .env file in the project root with:
FERNET_KEY=... UPSTASH_PROVIDERS_URL=... UPSTASH_PROVIDERS_TOKEN=... UPSTASH_KEYS_URL=... UPSTASH_KEYS_TOKEN=... UPSTASH_TRACKS_URL=... UPSTASH_TRACKS_TOKEN=... OPENAI_API_KEY=... GEMINI_API_KEY=... # Firebase credentials are loaded from app/firebase/firebase-adminsdk.json
Contributions are welcome! Please open issues or pull requests.
MIT (or specify your license here)
| Back | FazBrowse Home | New Git URL |