Skip to content

Commit

Permalink
Fix attr conversation_id not found
Browse files Browse the repository at this point in the history
  • Loading branch information
hlohaus committed Mar 27, 2024
1 parent fd92918 commit d0da590
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
4 changes: 2 additions & 2 deletions g4f/Provider/needs_auth/OpenaiChat.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,8 @@ async def create_async_generator(
fields = Conversation() if conversation is None else copy(conversation)
fields.finish_reason = None
while fields.finish_reason is None:
conversation_id = conversation_id if fields.conversation_id is None else fields.conversation_id
parent_id = parent_id if fields.message_id is None else fields.message_id
conversation_id = fields.conversation_id if hasattr(fields, "conversation_id") else conversation_id
parent_id = fields.message_id if hasattr(fields, "message_id") else parent_id
websocket_request_id = str(uuid.uuid4())
data = {
"action": action,
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ aiohttp_socks
gpt4all
pywebview
plyer
pycryptodome
cryptography
24 changes: 16 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,27 @@
"curl_cffi>=0.6.2",
"certifi",
"browser_cookie3", # get_cookies
"PyExecJS", # GptForLove
"PyExecJS", # GptForLove, Vercel
"duckduckgo-search>=5.0" ,# internet.search
"beautifulsoup4", # internet.search and bing.create_images
"brotli", # openai
#"undetected-chromedriver>=3.5.5", # webdriver
#"setuptools", # webdriver
"brotli", # openai, bing
# webdriver
#"undetected-chromedriver>=3.5.5",
#"setuptools",
#"selenium-wire"
# webview
"pywebview",
"platformdirs",
"plyer",
"cryptography",
####
"aiohttp_socks", # proxy
"pillow", # image
"cairosvg", # svg image
"werkzeug", "flask", # gui
"loguru", "fastapi",
"loguru", "fastapi", # api
"uvicorn", "nest_asyncio", # api
#"selenium-wire"
"pycryptodome" # openai
],
"image": [
"pillow",
Expand All @@ -51,9 +56,12 @@
"webview": [
"webview",
"platformdirs",
"plyer"
"plyer",
"cryptography"
],
"openai": [
"pycryptodome"
],
"openai": [],
"api": [
"loguru", "fastapi",
"uvicorn", "nest_asyncio"
Expand Down

0 comments on commit d0da590

Please sign in to comment.