vip11017's picture
added root path
16e4623
raw
history blame contribute delete
905 Bytes
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from app.ingestion.routes import router as ingestion_router
from app.chatbot.demo_routes import router as demo_router
from app.chatbot.prod_routes import router as prod_router
app = FastAPI(
title="Chatbot Platform - Demo Ingestion",
description="Handles Tally form ingestion and demo chatbot configuration.",
version="1.0.0",
root_path="/chatbot_platform"
)
@app.get("/")
def root():
return {"message": "Chatbot Platform is Live"}
# CORS setup (so React can call API)
app.add_middleware(
CORSMiddleware,
allow_origins=["*"],
allow_methods=["*"],
allow_headers=["*"],
)
app.include_router(ingestion_router, prefix="/ingestion", tags=["ingestion"])
app.include_router(demo_router, prefix="/demo", tags=["demochatbot"])
app.include_router(prod_router, prefix="/prod", tags=['production'])