diff options
author | Heiner Lohaus <hlohaus@users.noreply.github.com> | 2024-02-22 04:35:11 +0100 |
---|---|---|
committer | Heiner Lohaus <hlohaus@users.noreply.github.com> | 2024-02-22 04:35:11 +0100 |
commit | 1b4a86a857d9f9b77e0c7f0cd87468b627a250c8 (patch) | |
tree | f8a7102b0c633c6460a2e5fd9326434e18dfc9c6 /g4f/gui/server | |
parent | Move some modules, create providers dir (diff) | |
download | gpt4free-1b4a86a857d9f9b77e0c7f0cd87468b627a250c8.tar gpt4free-1b4a86a857d9f9b77e0c7f0cd87468b627a250c8.tar.gz gpt4free-1b4a86a857d9f9b77e0c7f0cd87468b627a250c8.tar.bz2 gpt4free-1b4a86a857d9f9b77e0c7f0cd87468b627a250c8.tar.lz gpt4free-1b4a86a857d9f9b77e0c7f0cd87468b627a250c8.tar.xz gpt4free-1b4a86a857d9f9b77e0c7f0cd87468b627a250c8.tar.zst gpt4free-1b4a86a857d9f9b77e0c7f0cd87468b627a250c8.zip |
Diffstat (limited to 'g4f/gui/server')
-rw-r--r-- | g4f/gui/server/backend.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/g4f/gui/server/backend.py b/g4f/gui/server/backend.py index 9788e5f5..454ed1c6 100644 --- a/g4f/gui/server/backend.py +++ b/g4f/gui/server/backend.py @@ -8,8 +8,6 @@ from g4f.image import is_allowed_extension, to_image from g4f.errors import VersionNotFoundError from g4f.Provider import __providers__ from g4f.Provider.bing.create_images import patch_provider -from .internet import get_search_message - class Backend_Api: """ @@ -157,6 +155,8 @@ class Backend_Api: if provider == "Bing": kwargs['web_search'] = True else: + # ResourceWarning: unclosed event loop + from .internet import get_search_message messages[-1]["content"] = get_search_message(messages[-1]["content"]) model = json_data.get('model') |