mateoluksenberg commited on
Commit
9dc762d
·
verified ·
1 Parent(s): 0911bc8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -15,6 +15,14 @@ from fastapi.responses import HTMLResponse
15
 
16
  app = FastAPI()
17
 
 
 
 
 
 
 
 
 
18
 
19
  MODEL_LIST = ["nikravan/glm-4vq"]
20
 
 
15
 
16
  app = FastAPI()
17
 
18
+ @app.post("/test/")
19
+ async def test_endpoint(message: dict):
20
+ if "text" not in message:
21
+ raise HTTPException(status_code=400, detail="Missing 'text' in request body")
22
+
23
+ response = {"message": f"Received your message: {message['text']}"}
24
+ return response
25
+
26
 
27
  MODEL_LIST = ["nikravan/glm-4vq"]
28