Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -234,7 +234,7 @@ async def chat(request: ChatRequest):
|
|
234 |
with WEBS(proxy=request.proxy) as webs:
|
235 |
chat_messages = []
|
236 |
chat_messages.extend(ast.literal_eval(request.history))
|
237 |
-
results = webs.chat(keywords=request.q, chat_messages = chat_messages,
|
238 |
return JSONResponse(content=jsonable_encoder(results))
|
239 |
except Exception as e:
|
240 |
raise HTTPException(status_code=500, detail=f"Error getting chat results: {e}")
|
|
|
234 |
with WEBS(proxy=request.proxy) as webs:
|
235 |
chat_messages = []
|
236 |
chat_messages.extend(ast.literal_eval(request.history))
|
237 |
+
results = webs.chat(keywords=request.q, chat_messages = chat_messages, model=request.model)
|
238 |
return JSONResponse(content=jsonable_encoder(results))
|
239 |
except Exception as e:
|
240 |
raise HTTPException(status_code=500, detail=f"Error getting chat results: {e}")
|