Spaces:
Runtime error
Runtime error
File size: 926 Bytes
65976bc |
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 38 39 |
"""
Module for setting up all the endpoints
"""
from fastapi import FastAPI
from intent import chat_router, test_app
from data_ingestion import ingestion_router
from download_data_for_RAG import reports_etl
app = FastAPI(
debug = False,
title = "AFEX-xbot",
summary = None,
description = "List of APIs for serving the LLM part of the bot",
version = "0.1.0",
)
@app.get("/")
@app.get("/home")
async def home():
return {
"status": 200,
"message": "ChatBot Agent",
}
# Mount the routers at a specific path
app.include_router(chat_router, prefix="/api/chatbot/v1")
app.include_router(ingestion_router, prefix="/api/data")
app.include_router(reports_etl, prefix="/api/data")
app.include_router(test_app, prefix="/api/test")
if __name__ == "__main__":
import uvicorn
uvicorn.run(
app="app:app",
host="127.0.0.1",
port=8000,
reload=True,
)
|