Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -45,7 +45,7 @@ def chat_completions():
|
|
45 |
except Exception as error:
|
46 |
print(error)
|
47 |
def errorStream():
|
48 |
-
yield 'data: %s\n\n' % json.dumps({"status":"!=200","error":error}, separators=(',' ':'))
|
49 |
return app.response_class(errorStream(), mimetype='text/event-stream')
|
50 |
if not streaming:
|
51 |
|
|
|
45 |
except Exception as error:
|
46 |
print(error)
|
47 |
def errorStream():
|
48 |
+
yield 'data: %s\n\n' % json.dumps({"status":"!=200","error":str(error)}, separators=(',' ':'))
|
49 |
return app.response_class(errorStream(), mimetype='text/event-stream')
|
50 |
if not streaming:
|
51 |
|