Spaces:
Running
Running
Commit
·
08a2f2d
1
Parent(s):
88b2467
Fix syntax JSON parse query
Browse files
app.py
CHANGED
@@ -275,7 +275,8 @@ chatbot = RAGMedicalChatbot(model_name="gemini-2.5-flash-preview-04-17", retriev
|
|
275 |
async def chat_endpoint(req: Request):
|
276 |
body = await req.json()
|
277 |
user_id = body.get("user_id", "anonymous")
|
278 |
-
|
|
|
279 |
lang = body.get("lang", "EN")
|
280 |
image_base64 = body.get("image_base64", None)
|
281 |
# LLM Only
|
|
|
275 |
async def chat_endpoint(req: Request):
|
276 |
body = await req.json()
|
277 |
user_id = body.get("user_id", "anonymous")
|
278 |
+
query_raw = body.get("query")
|
279 |
+
query = query_raw.strip() if isinstance(query_raw, str) else ""
|
280 |
lang = body.get("lang", "EN")
|
281 |
image_base64 = body.get("image_base64", None)
|
282 |
# LLM Only
|