Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -5,7 +5,7 @@ colorFrom: red
|
|
| 5 |
colorTo: purple
|
| 6 |
sdk: docker
|
| 7 |
pinned: false
|
| 8 |
-
license:
|
| 9 |
short_description: The Bridge of The API's
|
| 10 |
---
|
| 11 |
|
|
@@ -284,50 +284,6 @@ const result = await getBestMove('rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w
|
|
| 284 |
console.log(`Best move: ${result.best_move}`);
|
| 285 |
```
|
| 286 |
|
| 287 |
-
### Lichess Bot Integration
|
| 288 |
-
|
| 289 |
-
```python
|
| 290 |
-
import berserk
|
| 291 |
-
import requests
|
| 292 |
-
|
| 293 |
-
API_URL = "https://YOUR-SPACE.hf.space"
|
| 294 |
-
|
| 295 |
-
def get_engine_move(board_fen):
|
| 296 |
-
response = requests.post(f"{API_URL}/predict", json={
|
| 297 |
-
"fen": board_fen,
|
| 298 |
-
"model": "base", # Use strongest model
|
| 299 |
-
"depth": 6,
|
| 300 |
-
"time_limit": 5000
|
| 301 |
-
})
|
| 302 |
-
return response.json()['best_move']
|
| 303 |
-
|
| 304 |
-
# Use in Lichess bot
|
| 305 |
-
client = berserk.Client(berserk.TokenSession(API_TOKEN))
|
| 306 |
-
for event in client.bots.stream_incoming_events():
|
| 307 |
-
# ... handle game
|
| 308 |
-
move = get_engine_move(game.fen())
|
| 309 |
-
client.bots.make_move(game_id, move)
|
| 310 |
-
```
|
| 311 |
-
|
| 312 |
-
## Performance
|
| 313 |
-
|
| 314 |
-
- **Cache Hit Rate**: ~40-50% for common positions
|
| 315 |
-
- **Average Latency**: 2-5 seconds depending on model
|
| 316 |
-
- **Throughput**: Unlimited (no rate limits)
|
| 317 |
-
|
| 318 |
-
## Monitoring
|
| 319 |
-
|
| 320 |
-
View real-time statistics:
|
| 321 |
-
```bash
|
| 322 |
-
curl https://YOUR-SPACE.hf.space/stats
|
| 323 |
-
```
|
| 324 |
-
|
| 325 |
-
## Support
|
| 326 |
-
|
| 327 |
-
- **Space URL**: [Your HuggingFace Space](https://huggingface.co/spaces/GambitFlow/API-Bridge)
|
| 328 |
-
- **Main Site**: [gambitflow.onrender.com](https://gambitflow.onrender.com)
|
| 329 |
-
- **Issues**: GitHub Issues
|
| 330 |
-
|
| 331 |
---
|
| 332 |
|
| 333 |
**GambitFlow Bridge API** - Unified gateway for chess AI engines
|
|
|
|
| 5 |
colorTo: purple
|
| 6 |
sdk: docker
|
| 7 |
pinned: false
|
| 8 |
+
license: gpl-3.0
|
| 9 |
short_description: The Bridge of The API's
|
| 10 |
---
|
| 11 |
|
|
|
|
| 284 |
console.log(`Best move: ${result.best_move}`);
|
| 285 |
```
|
| 286 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 287 |
---
|
| 288 |
|
| 289 |
**GambitFlow Bridge API** - Unified gateway for chess AI engines
|