summaryrefslogtreecommitdiffstats
path: root/g4f/gui
diff options
context:
space:
mode:
authorHeiner Lohaus <hlohaus@users.noreply.github.com>2024-02-22 04:35:11 +0100
committerHeiner Lohaus <hlohaus@users.noreply.github.com>2024-02-22 04:35:11 +0100
commit1b4a86a857d9f9b77e0c7f0cd87468b627a250c8 (patch)
treef8a7102b0c633c6460a2e5fd9326434e18dfc9c6 /g4f/gui
parentMove some modules, create providers dir (diff)
downloadgpt4free-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')
-rw-r--r--g4f/gui/server/backend.py4
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')