From 1a8869238204c91d34b0c1df1756d609c48f7052 Mon Sep 17 00:00:00 2001 From: kqlio67 Date: Thu, 7 Nov 2024 11:41:16 +0200 Subject: Update (g4f/Provider/ChatGpt.py g4f/Provider/DarkAI.py) --- g4f/Provider/ChatGpt.py | 1 - g4f/Provider/DarkAI.py | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'g4f/Provider') diff --git a/g4f/Provider/ChatGpt.py b/g4f/Provider/ChatGpt.py index 9304e4a0..02bbbcc4 100644 --- a/g4f/Provider/ChatGpt.py +++ b/g4f/Provider/ChatGpt.py @@ -210,7 +210,6 @@ class ChatGpt(AbstractProvider, ProviderModelMixin): for line in response.iter_lines(): if line: decoded_line = line.decode() - print(decoded_line) if decoded_line.startswith('data:'): json_string = decoded_line[6:].strip() diff --git a/g4f/Provider/DarkAI.py b/g4f/Provider/DarkAI.py index 54f456fe..06e2bd55 100644 --- a/g4f/Provider/DarkAI.py +++ b/g4f/Provider/DarkAI.py @@ -75,9 +75,9 @@ class DarkAI(AsyncGeneratorProvider, ProviderModelMixin): yield full_text.strip() return except json.JSONDecodeError: - print(f"Failed to decode JSON: {chunk_str}") - except Exception as e: - print(f"Error processing chunk: {e}") + pass + except Exception: + pass if full_text: yield full_text.strip() -- cgit v1.2.3