From 1b4a86a857d9f9b77e0c7f0cd87468b627a250c8 Mon Sep 17 00:00:00 2001 From: Heiner Lohaus Date: Thu, 22 Feb 2024 04:35:11 +0100 Subject: Update client docs, Enable some tests --- g4f/gui/server/backend.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'g4f/gui/server') 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') -- cgit v1.2.3