Spaces:
Sleeping
Sleeping
Update api.py
Browse files
api.py
CHANGED
|
@@ -294,7 +294,7 @@ class AgentProcessor:
|
|
| 294 |
return None
|
| 295 |
|
| 296 |
# Initialize FastAPI app
|
| 297 |
-
app = FastAPI(
|
| 298 |
agent_processor = None
|
| 299 |
|
| 300 |
# Add CORS middleware
|
|
@@ -309,7 +309,7 @@ app.add_middleware(
|
|
| 309 |
@app.on_event("startup")
|
| 310 |
async def startup_event():
|
| 311 |
global agent_processor
|
| 312 |
-
api_key = os.getenv("DIFY_API_KEY"
|
| 313 |
agent_processor = AgentProcessor(api_key=api_key)
|
| 314 |
|
| 315 |
@app.on_event("shutdown")
|
|
|
|
| 294 |
return None
|
| 295 |
|
| 296 |
# Initialize FastAPI app
|
| 297 |
+
app = FastAPI()
|
| 298 |
agent_processor = None
|
| 299 |
|
| 300 |
# Add CORS middleware
|
|
|
|
| 309 |
@app.on_event("startup")
|
| 310 |
async def startup_event():
|
| 311 |
global agent_processor
|
| 312 |
+
api_key = os.getenv("DIFY_API_KEY")
|
| 313 |
agent_processor = AgentProcessor(api_key=api_key)
|
| 314 |
|
| 315 |
@app.on_event("shutdown")
|