From b207fc42f4294cc45f72729bf7d3c024a51047b4 Mon Sep 17 00:00:00 2001 From: yym68686 Date: Thu, 19 Oct 2023 09:14:02 +0800 Subject: [PATCH] fixed bug: No module named 'rich' --- gpt4free.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/gpt4free.py b/gpt4free.py index bd905a9b..863eb4b1 100644 --- a/gpt4free.py +++ b/gpt4free.py @@ -1,9 +1,6 @@ -import g4f import re -import os +import g4f import config -from rich.console import Console -from rich.markdown import Markdown def get_response(message, **kwargs): response = g4f.ChatCompletion.create( @@ -24,14 +21,9 @@ def bing(response): if __name__ == "__main__": - console = Console() message = rf""" """ answer = "" for result in get_response(message, "gpt-4"): - os.system("clear") - answer += result - md = Markdown(answer) - console.print(md) - + print(result, end="") \ No newline at end of file