Akoda35 commited on
Commit
836f14f
·
verified ·
1 Parent(s): 65533dc

Create app/main.py

Browse files
Files changed (1) hide show
  1. app/main.py +16 -0
app/main.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # app/main.py
2
+
3
+ from fastapi import FastAPI, Request
4
+ from fastapi.responses import JSONResponse
5
+ from app.agents.orchestrator import process_request
6
+
7
+ app = FastAPI()
8
+
9
+ @app.post("/api/agent")
10
+ async def agent(request: Request):
11
+ body = await request.json()
12
+
13
+ prompt = body.get("prompt")
14
+ user_id = body.get("user_id", "anon")
15
+
16
+ return process_request(prompt, user_id)