Spaces:
Sleeping
Sleeping
File size: 905 Bytes
ec295dd 649efae 0df7bd3 1fdc232 52974f8 ec295dd 16e4623 ec295dd 649efae ec295dd 52974f8 |
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 |
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']) |