Download chat/api/app.py from Codexcoder/sovereign-integration: direct link, hf CLI and curl.
- Browser
- Download file 933 Bytes
-
https://huggingface.co/datasets/Codexcoder/sovereign-integration/resolve/main/chat/api/app.py
- Command line
-
hf download hf://datasets/Codexcoder/sovereign-integration/chat/api/app.py
-
curl -L -o app.py https://huggingface.co/datasets/Codexcoder/sovereign-integration/resolve/main/chat/api/app.py
933 Bytes
| # chat/api/app.py | |
| """ | |
| DeepSeek V4 chat standalone FastAPI app. | |
| Run standalone:: | |
| uvicorn chat.api.app:app --host 0.0.0.0 --port 8003 | |
| or mount into the Sovereign orchestrator (src/sovereign/main.py) which | |
| includes chat.api.routes.router under /api/v1/chat. | |
| """ | |
| from __future__ import annotations | |
| from fastapi import FastAPI | |
| from chat import __brand__, __version__ | |
| from chat.api.routes import router | |
| app = FastAPI( | |
| title="DeepSeek V4 Chat API", | |
| version=__version__, | |
| description=f"{__brand__} — sovereign-tuned conversational core", | |
| ) | |
| app.include_router(router) | |
| def index() -> dict: | |
| """Service banner.""" | |
| return { | |
| "service": "chat", | |
| "brand": __brand__, | |
| "version": __version__, | |
| "endpoints": "/api/v1/chat/*", | |
| } | |
| def health() -> dict: | |
| """Liveness probe.""" | |
| return {"status": "ok", "brand": __brand__, "version": __version__} | |