From 7a19a6c941dde9d11bbcdaaab56725be52ef7aa8 Mon Sep 17 00:00:00 2001 From: Heiner Lohaus Date: Thu, 2 Jan 2025 02:59:46 +0100 Subject: Fix unittests --- g4f/tools/web_search.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'g4f/tools') diff --git a/g4f/tools/web_search.py b/g4f/tools/web_search.py index 780e45df..314ddf0b 100644 --- a/g4f/tools/web_search.py +++ b/g4f/tools/web_search.py @@ -192,7 +192,9 @@ Instruction: {instructions} User request: {prompt} """ - debug.log(f"Web search: '{query.strip()[:50]}...' {len(search_results.results)} Results {search_results.used_words} Words") + debug.log(f"Web search: '{query.strip()[:50]}...'") + if isinstance(search_results, SearchResults): + debug.log(f"with {len(search_results.results)} Results {search_results.used_words} Words") return new_prompt def get_search_message(prompt: str, raise_search_exceptions=False, **kwargs) -> str: -- cgit v1.2.3