Codexcoder commited on
Commit
68786c2
·
verified ·
1 Parent(s): 7e081c6

integration: add chat/api/app.py

Browse files
Files changed (1) hide show
  1. chat/api/app.py +42 -0
chat/api/app.py ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # chat/api/app.py
2
+ """
3
+ DeepSeek V4 chat standalone FastAPI app.
4
+
5
+ Run standalone::
6
+
7
+ uvicorn chat.api.app:app --host 0.0.0.0 --port 8003
8
+
9
+ or mount into the Sovereign orchestrator (src/sovereign/main.py) which
10
+ includes chat.api.routes.router under /api/v1/chat.
11
+ """
12
+
13
+ from __future__ import annotations
14
+
15
+ from fastapi import FastAPI
16
+
17
+ from chat import __brand__, __version__
18
+ from chat.api.routes import router
19
+
20
+ app = FastAPI(
21
+ title="DeepSeek V4 Chat API",
22
+ version=__version__,
23
+ description=f"{__brand__} — sovereign-tuned conversational core",
24
+ )
25
+ app.include_router(router)
26
+
27
+
28
+ @app.get("/")
29
+ def index() -> dict:
30
+ """Service banner."""
31
+ return {
32
+ "service": "chat",
33
+ "brand": __brand__,
34
+ "version": __version__,
35
+ "endpoints": "/api/v1/chat/*",
36
+ }
37
+
38
+
39
+ @app.get("/health")
40
+ def health() -> dict:
41
+ """Liveness probe."""
42
+ return {"status": "ok", "brand": __brand__, "version": __version__}