We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 653a56e commit 1a4a745Copy full SHA for 1a4a745
science/server.py
@@ -42,19 +42,20 @@ def clear_conversation() -> str:
42
return "Conversation Cleared"
43
44
45
+def _clear_conversation(user_id: int):
46
+ db.conversationmessage.delete_many(where={"userId": user_id})
47
+
48
49
@app.route("/error")
50
def error():
51
raise Exception("This is an error")
52
53
-def _clear_conversation(user_id: int):
- db.conversationmessage.delete_many(where={"userId": user_id})
-
54
@app.errorhandler(OpenAIError)
55
def handle_exception(e):
56
# now you're handling non-HTTP exceptions only
57
msg = f"Sadly, OpenAI appears to be down. Please try again later. ({e.__class__.__name__})"
58
+ app.logger.error(msg)
59
return msg, 500
60
61
0 commit comments