Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
|