|
20 | 20 | from fastapi.responses import FileResponse |
21 | 21 | from pydantic import BaseModel, Field |
22 | 22 |
|
23 | | -from vector_graph_rag import VectorGraphRAG |
| 23 | +from vector_graph_rag import VectorGraphRAG, __version__ |
24 | 24 | from vector_graph_rag.config import Settings, get_settings |
25 | 25 | from vector_graph_rag.storage.milvus import MilvusStore |
26 | 26 | from vector_graph_rag.graph.graph import Graph |
|
32 | 32 | class HealthResponse(BaseModel): |
33 | 33 | """Health check response.""" |
34 | 34 | status: str = Field(default="ok", description="Service status") |
35 | | - version: str = Field(default="0.1.0", description="API version") |
| 35 | + version: str = Field(default=__version__, description="API version") |
36 | 36 |
|
37 | 37 |
|
38 | 38 | class GraphInfo(BaseModel): |
@@ -258,7 +258,7 @@ def create_app(settings: Optional[Settings] = None) -> FastAPI: |
258 | 258 | app = FastAPI( |
259 | 259 | title="Vector Graph RAG API", |
260 | 260 | description="Graph RAG using pure vector search with Milvus", |
261 | | - version="0.1.0", |
| 261 | + version=__version__, |
262 | 262 | ) |
263 | 263 |
|
264 | 264 | # Add CORS middleware for frontend |
@@ -300,7 +300,7 @@ def get_graph(graph_name: Optional[str] = None) -> Graph: |
300 | 300 | @app.get("/health", response_model=HealthResponse, tags=["System"]) |
301 | 301 | async def health_check(): |
302 | 302 | """Check if the service is running.""" |
303 | | - return HealthResponse(status="ok", version="0.1.0") |
| 303 | + return HealthResponse(status="ok", version=__version__) |
304 | 304 |
|
305 | 305 | @app.get("/graphs", response_model=ListGraphsResponse, tags=["System"]) |
306 | 306 | async def list_graphs(): |
|
0 commit comments