File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 11import os
22
33import uvicorn
4+ import fastapi .middleware .cors import CORMiddleware
45from google .adk .cli .fast_api import get_fast_api_app
56
67# Get the directory where main.py is located
78AGENT_DIR = os .path .dirname (os .path .abspath (__file__ ))
89# Example session DB URL (e.g., SQLite)
910# SESSION_DB_URL = "sqlite:///./sessions.db"
1011# Example allowed origins for CORS
11- ALLOWED_ORIGINS = ["* " ]
12+ ALLOWED_ORIGINS = ["https://chaos-pilot.vercel.app" , "http://localhost:4200 " ]
1213# Set web=True if you intend to serve a web interface, False otherwise
1314SERVE_WEB_INTERFACE = True
1415
1516
1617# Call the function to get the FastAPI app instance
1718# Ensure the agent directory name ('capital_agent') matches your agent folder
1819app = get_fast_api_app (
20+ CORMiddleware ,
1921 agents_dir = AGENT_DIR ,
20- # session_service_uri=SESSION_DB_URL,
2122 allow_origins = ALLOWED_ORIGINS ,
2223 web = SERVE_WEB_INTERFACE ,
2324)
You can’t perform that action at this time.
0 commit comments