mirror of
https://github.com/arc53/DocsGPT
synced 2024-11-19 21:25:39 +00:00
fix: stream stuff
This commit is contained in:
parent
70bb9477c5
commit
2e2149c110
@ -197,8 +197,8 @@ def complete_stream(question, retriever, conversation_id, user_api_key):
|
||||
yield f"data: {data}\n\n"
|
||||
data = json.dumps({"type": "end"})
|
||||
yield f"data: {data}\n\n"
|
||||
except Exception:
|
||||
data = json.dumps({"type": "error","error":"Please try again later. We apologize for any inconvenience."})
|
||||
except Exception as e:
|
||||
data = json.dumps({"type": "error","error": str(e)})
|
||||
yield f"data: {data}\n\n"
|
||||
return
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user