Skip to content

Commit

Permalink
fixed bug: No module named 'rich'
Browse files Browse the repository at this point in the history
  • Loading branch information
yym68686 committed Oct 19, 2023
1 parent a73b564 commit b207fc4
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions gpt4free.py
Original file line number Diff line number Diff line change
@@ -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(
Expand All @@ -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="")

0 comments on commit b207fc4

Please sign in to comment.