-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi_service.py
More file actions
37 lines (29 loc) · 781 Bytes
/
api_service.py
File metadata and controls
37 lines (29 loc) · 781 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
"""
FastAPI WebSocket Service for Hybrid Search RAG Pipeline
Simplified version that properly handles conversation history.
Run with: uvicorn api_service:app --reload --host 0.0.0.0 --port 8000
"""
import logging
from fastapi import FastAPI
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s [%(levelname)s] %(name)s: %(message)s",
)
from api.lifespan import lifespan
from api.routes import router
# --- FastAPI App ---
app = FastAPI(
title="RAG Chat API",
description="Hybrid Search RAG with Conversation History",
version="1.0.0",
lifespan=lifespan
)
app.include_router(router)
if __name__ == "__main__":
import uvicorn
uvicorn.run(
"api_service:app",
host="0.0.0.0",
port=8000,
reload=True
)