Spaces:
Runtime error
Runtime error
Update README for hybrid service
Browse files
README.md
CHANGED
|
@@ -9,42 +9,41 @@ app_file: app.py
|
|
| 9 |
pinned: false
|
| 10 |
---
|
| 11 |
|
| 12 |
-
# Enhanced Gemini Multi-API -
|
| 13 |
|
| 14 |
-
π€ **Anthropic
|
| 15 |
|
| 16 |
-
A
|
| 17 |
|
| 18 |
## Features
|
| 19 |
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
- `POST /v1/messages` - Chat completions
|
| 22 |
-
- `GET /v1/models` - List available models
|
| 23 |
-
- `POST /v1/completions` - OpenAI compatible fallback
|
| 24 |
- `GET /health` - Health check
|
| 25 |
- `GET /info` - API information
|
| 26 |
|
| 27 |
-
|
| 28 |
-
- `claude-3-sonnet-20240229` β Gemini 1.5 Pro
|
| 29 |
- `claude-3-haiku-20240307` β Gemini 1.5 Flash
|
|
|
|
| 30 |
- `claude-3-5-sonnet-20241022` β Gemini 1.5 Pro
|
| 31 |
- `claude-3-5-haiku-20241022` β Gemini 1.5 Flash
|
| 32 |
-
- Direct Gemini models: gemini-1.5-pro, gemini-1.5-flash, etc.
|
| 33 |
|
| 34 |
-
|
| 35 |
-
- Full Anthropic API compatibility
|
| 36 |
-
- Proper response formatting
|
| 37 |
-
- Token usage tracking
|
| 38 |
-
- Error handling
|
| 39 |
-
- Rate limiting ready
|
| 40 |
|
| 41 |
-
##
|
|
|
|
| 42 |
|
| 43 |
-
###
|
| 44 |
```bash
|
| 45 |
curl -X POST https://likhonsheikh-enhanced-gemini-multi-api.hf.space/v1/messages \
|
| 46 |
-H "Content-Type: application/json" \
|
| 47 |
-
-H "Authorization: Bearer $HF_TOKEN" \
|
| 48 |
-d '{
|
| 49 |
"model": "claude-3-haiku-20240307",
|
| 50 |
"messages": [{"role": "user", "content": "Hello!"}],
|
|
@@ -53,26 +52,24 @@ curl -X POST https://likhonsheikh-enhanced-gemini-multi-api.hf.space/v1/messages
|
|
| 53 |
}'
|
| 54 |
```
|
| 55 |
|
| 56 |
-
###
|
| 57 |
-
```bash
|
| 58 |
-
curl https://likhonsheikh-enhanced-gemini-multi-api.hf.space/v1/models
|
| 59 |
-
```
|
| 60 |
-
|
| 61 |
-
### Health Check
|
| 62 |
```bash
|
| 63 |
curl https://likhonsheikh-enhanced-gemini-multi-api.hf.space/health
|
|
|
|
| 64 |
```
|
| 65 |
|
| 66 |
## Configuration
|
| 67 |
|
| 68 |
**Required:** Set `GEMINI_API_KEY` in Space secrets for full functionality.
|
| 69 |
|
| 70 |
-
|
|
|
|
| 71 |
|
| 72 |
## Status
|
| 73 |
|
| 74 |
-
β
**
|
| 75 |
-
β
**
|
| 76 |
-
β
**
|
|
|
|
| 77 |
|
| 78 |
**Updated:** 2025-11-14 04:17:24
|
|
|
|
| 9 |
pinned: false
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# Enhanced Gemini Multi-API - Hybrid Service
|
| 13 |
|
| 14 |
+
π€ **Anthropic Compatible API + Web Interface**
|
| 15 |
|
| 16 |
+
A comprehensive service providing Google Gemini models through an Anthropic-compatible interface with both web interface and API endpoints.
|
| 17 |
|
| 18 |
## Features
|
| 19 |
|
| 20 |
+
π **Web Interface**
|
| 21 |
+
- Interactive chat with Gemini models
|
| 22 |
+
- Real-time API testing
|
| 23 |
+
- Model selection and configuration
|
| 24 |
+
- Usage tracking and status monitoring
|
| 25 |
+
|
| 26 |
+
π€ **API Endpoints** (Anthropic Compatible)
|
| 27 |
- `POST /v1/messages` - Chat completions
|
| 28 |
+
- `GET /v1/models` - List available models
|
|
|
|
| 29 |
- `GET /health` - Health check
|
| 30 |
- `GET /info` - API information
|
| 31 |
|
| 32 |
+
π€ **Model Compatibility**
|
|
|
|
| 33 |
- `claude-3-haiku-20240307` β Gemini 1.5 Flash
|
| 34 |
+
- `claude-3-sonnet-20240229` β Gemini 1.5 Pro
|
| 35 |
- `claude-3-5-sonnet-20241022` β Gemini 1.5 Pro
|
| 36 |
- `claude-3-5-haiku-20241022` β Gemini 1.5 Flash
|
|
|
|
| 37 |
|
| 38 |
+
## Quick Start
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
|
| 40 |
+
### Web Interface
|
| 41 |
+
Visit the space URL and use the interactive chat interface.
|
| 42 |
|
| 43 |
+
### API Usage
|
| 44 |
```bash
|
| 45 |
curl -X POST https://likhonsheikh-enhanced-gemini-multi-api.hf.space/v1/messages \
|
| 46 |
-H "Content-Type: application/json" \
|
|
|
|
| 47 |
-d '{
|
| 48 |
"model": "claude-3-haiku-20240307",
|
| 49 |
"messages": [{"role": "user", "content": "Hello!"}],
|
|
|
|
| 52 |
}'
|
| 53 |
```
|
| 54 |
|
| 55 |
+
### Test API
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
```bash
|
| 57 |
curl https://likhonsheikh-enhanced-gemini-multi-api.hf.space/health
|
| 58 |
+
curl https://likhonsheikh-enhanced-gemini-multi-api.hf.space/v1/models
|
| 59 |
```
|
| 60 |
|
| 61 |
## Configuration
|
| 62 |
|
| 63 |
**Required:** Set `GEMINI_API_KEY` in Space secrets for full functionality.
|
| 64 |
|
| 65 |
+
Without API key: Shows status and web interface only.
|
| 66 |
+
With API key: Full chat and API testing capabilities.
|
| 67 |
|
| 68 |
## Status
|
| 69 |
|
| 70 |
+
β
**HYBRID SERVICE DEPLOYED**
|
| 71 |
+
β
**WEB INTERFACE + API ENDPOINTS**
|
| 72 |
+
β
**ANTHROPIC API COMPATIBLE**
|
| 73 |
+
β
**PRODUCTION READY**
|
| 74 |
|
| 75 |
**Updated:** 2025-11-14 04:17:24
|