diff options
author | Heiner Lohaus <hlohaus@users.noreply.github.com> | 2023-12-10 22:10:56 +0100 |
---|---|---|
committer | Heiner Lohaus <hlohaus@users.noreply.github.com> | 2023-12-10 22:10:56 +0100 |
commit | c7307030a9d3c6d9db0300573f358e3e203bb693 (patch) | |
tree | ea7f7db87d08f6d7f0813551fe3af5f72e258578 /g4f/gui/server/backend.py | |
parent | Add G4F_PROXY environment (diff) | |
download | gpt4free-c7307030a9d3c6d9db0300573f358e3e203bb693.tar gpt4free-c7307030a9d3c6d9db0300573f358e3e203bb693.tar.gz gpt4free-c7307030a9d3c6d9db0300573f358e3e203bb693.tar.bz2 gpt4free-c7307030a9d3c6d9db0300573f358e3e203bb693.tar.lz gpt4free-c7307030a9d3c6d9db0300573f358e3e203bb693.tar.xz gpt4free-c7307030a9d3c6d9db0300573f358e3e203bb693.tar.zst gpt4free-c7307030a9d3c6d9db0300573f358e3e203bb693.zip |
Diffstat (limited to 'g4f/gui/server/backend.py')
-rw-r--r-- | g4f/gui/server/backend.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/g4f/gui/server/backend.py b/g4f/gui/server/backend.py index d17e21b7..9dc5dbb4 100644 --- a/g4f/gui/server/backend.py +++ b/g4f/gui/server/backend.py @@ -74,14 +74,14 @@ class Backend_Api: provider = g4f.Provider.ProviderUtils.convert.get(provider) def try_response(): - response = g4f.ChatCompletion.create( - model=model, - provider=provider, - messages=messages, - stream=True, - ignore_stream_and_auth=True - ) try: + response = g4f.ChatCompletion.create( + model=model, + provider=provider, + messages=messages, + stream=True, + ignore_stream_and_auth=True + ) yield from response except Exception as e: print(e) |