summaryrefslogtreecommitdiffstats
path: root/g4f/gui
diff options
context:
space:
mode:
authorHeiner Lohaus <hlohaus@users.noreply.github.com>2024-01-01 23:20:48 +0100
committerHeiner Lohaus <hlohaus@users.noreply.github.com>2024-01-01 23:20:48 +0100
commite0aaad8f477386345a14c9adc7a7721fda115faa (patch)
treeac88be0b5d29f7e09d43ba581488750067037bfb /g4f/gui
parentAdd support for all models (diff)
downloadgpt4free-e0aaad8f477386345a14c9adc7a7721fda115faa.tar
gpt4free-e0aaad8f477386345a14c9adc7a7721fda115faa.tar.gz
gpt4free-e0aaad8f477386345a14c9adc7a7721fda115faa.tar.bz2
gpt4free-e0aaad8f477386345a14c9adc7a7721fda115faa.tar.lz
gpt4free-e0aaad8f477386345a14c9adc7a7721fda115faa.tar.xz
gpt4free-e0aaad8f477386345a14c9adc7a7721fda115faa.tar.zst
gpt4free-e0aaad8f477386345a14c9adc7a7721fda115faa.zip
Diffstat (limited to 'g4f/gui')
-rw-r--r--g4f/gui/server/backend.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/g4f/gui/server/backend.py b/g4f/gui/server/backend.py
index 1aa506b2..595f5aa1 100644
--- a/g4f/gui/server/backend.py
+++ b/g4f/gui/server/backend.py
@@ -1,3 +1,4 @@
+import logging
import g4f
from g4f.Provider import __providers__
@@ -94,10 +95,10 @@ class Backend_Api:
}) + "\n"
except Exception as e:
+ logging.exception(e)
yield json.dumps({
'type' : 'error',
'error': f'{e.__class__.__name__}: {e}'
})
- raise e
return self.app.response_class(try_response(), mimetype='text/event-stream') \ No newline at end of file