Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from fastapi import FastAPI
|
| 2 |
+
from pydantic import BaseModel
|
| 3 |
+
|
| 4 |
+
app = FastAPI()
|
| 5 |
+
|
| 6 |
+
class Request(BaseModel):
|
| 7 |
+
prompt: str
|
| 8 |
+
|
| 9 |
+
@app.post("/chat")
|
| 10 |
+
def chat(req: Request):
|
| 11 |
+
|
| 12 |
+
# Yahan tool-calling loop implement karna hoga
|
| 13 |
+
|
| 14 |
+
return {
|
| 15 |
+
"message": "agent response"
|
| 16 |
+
}
|