don't 404 when trying to connect to a non-existent conversation, just create it
This commit is contained in:
parent
3a73e21c5b
commit
115c762e57
1 changed files with 6 additions and 4 deletions
|
@ -29,10 +29,12 @@ async def connect_to_conversation(ws: WebSocket):
|
|||
try:
|
||||
conversation: llm.AsyncConversation = llm.cli.load_conversation(conversation_id, async_=True)
|
||||
except:
|
||||
await ws.send_denial_response(JSONResponse({
|
||||
"error": "unable to load conversation {}".format(conversation_id)
|
||||
}, status_code=404))
|
||||
return
|
||||
# await ws.send_denial_response(JSONResponse({
|
||||
# "error": "unable to load conversation {}".format(conversation_id)
|
||||
# }, status_code=404))
|
||||
# return
|
||||
model = llm.get_async_model(ws.query_params.get("model"))
|
||||
conversation = llm.AsyncConversation(model, id=conversation_id)
|
||||
|
||||
await ws.accept()
|
||||
|
||||
|
|
Loading…
Reference in a new issue