Spaces:
Sleeping
Sleeping
File size: 1,123 Bytes
b9fb109 f5175be b9fb109 f5175be b9fb109 f5175be b9fb109 1667336 f5175be b9fb109 | 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 40 41 42 43 44 45 46 47 48 49 50 51 52 | from config.reuseable import FastAPI, API_URL, CORSMiddleware, register_tortoise
app = FastAPI(
title="Growth AI API and Agent",
description="API dor Growth AI",
version="1.0.0",
docs_url="/docs",
openapi_tags=[
{
"name": "Test",
"description": "Test related operations",
},
{
"name": "Auth",
"description": "Authentication related operations",
},
{
"name": "User",
"description": "User related operations",
},
{
"name": "Challenge",
"description": "Challenge related operations",
},
{
"name": "Agent",
"description": "AI Agent related operations",
},
],
)
# Middleware
app.add_middleware(
CORSMiddleware,
allow_origins=[
"http://127.0.0.1:5173",
"http://localhost:5173",
],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
@app.get("/", tags=["Test"])
def read_root():
return {"message": "Growth AI Agent Ready"}
# other routes
|