mirror of https://github.com/xtekky/gpt4free.git
Fix attr conversation_id not found
This commit is contained in:
parent
fd92918b77
commit
d0da5900c4
|
@ -392,8 +392,8 @@ class OpenaiChat(AsyncGeneratorProvider, ProviderModelMixin):
|
||||||
fields = Conversation() if conversation is None else copy(conversation)
|
fields = Conversation() if conversation is None else copy(conversation)
|
||||||
fields.finish_reason = None
|
fields.finish_reason = None
|
||||||
while fields.finish_reason is None:
|
while fields.finish_reason is None:
|
||||||
conversation_id = conversation_id if fields.conversation_id is None else fields.conversation_id
|
conversation_id = fields.conversation_id if hasattr(fields, "conversation_id") else conversation_id
|
||||||
parent_id = parent_id if fields.message_id is None else fields.message_id
|
parent_id = fields.message_id if hasattr(fields, "message_id") else parent_id
|
||||||
websocket_request_id = str(uuid.uuid4())
|
websocket_request_id = str(uuid.uuid4())
|
||||||
data = {
|
data = {
|
||||||
"action": action,
|
"action": action,
|
||||||
|
|
|
@ -20,4 +20,4 @@ aiohttp_socks
|
||||||
gpt4all
|
gpt4all
|
||||||
pywebview
|
pywebview
|
||||||
plyer
|
plyer
|
||||||
pycryptodome
|
cryptography
|
24
setup.py
24
setup.py
|
@ -20,22 +20,27 @@ EXTRA_REQUIRE = {
|
||||||
"curl_cffi>=0.6.2",
|
"curl_cffi>=0.6.2",
|
||||||
"certifi",
|
"certifi",
|
||||||
"browser_cookie3", # get_cookies
|
"browser_cookie3", # get_cookies
|
||||||
"PyExecJS", # GptForLove
|
"PyExecJS", # GptForLove, Vercel
|
||||||
"duckduckgo-search>=5.0" ,# internet.search
|
"duckduckgo-search>=5.0" ,# internet.search
|
||||||
"beautifulsoup4", # internet.search and bing.create_images
|
"beautifulsoup4", # internet.search and bing.create_images
|
||||||
"brotli", # openai
|
"brotli", # openai, bing
|
||||||
#"undetected-chromedriver>=3.5.5", # webdriver
|
# webdriver
|
||||||
#"setuptools", # webdriver
|
#"undetected-chromedriver>=3.5.5",
|
||||||
|
#"setuptools",
|
||||||
|
#"selenium-wire"
|
||||||
|
# webview
|
||||||
"pywebview",
|
"pywebview",
|
||||||
"platformdirs",
|
"platformdirs",
|
||||||
"plyer",
|
"plyer",
|
||||||
|
"cryptography",
|
||||||
|
####
|
||||||
"aiohttp_socks", # proxy
|
"aiohttp_socks", # proxy
|
||||||
"pillow", # image
|
"pillow", # image
|
||||||
"cairosvg", # svg image
|
"cairosvg", # svg image
|
||||||
"werkzeug", "flask", # gui
|
"werkzeug", "flask", # gui
|
||||||
"loguru", "fastapi",
|
"loguru", "fastapi", # api
|
||||||
"uvicorn", "nest_asyncio", # api
|
"uvicorn", "nest_asyncio", # api
|
||||||
#"selenium-wire"
|
"pycryptodome" # openai
|
||||||
],
|
],
|
||||||
"image": [
|
"image": [
|
||||||
"pillow",
|
"pillow",
|
||||||
|
@ -51,9 +56,12 @@ EXTRA_REQUIRE = {
|
||||||
"webview": [
|
"webview": [
|
||||||
"webview",
|
"webview",
|
||||||
"platformdirs",
|
"platformdirs",
|
||||||
"plyer"
|
"plyer",
|
||||||
|
"cryptography"
|
||||||
|
],
|
||||||
|
"openai": [
|
||||||
|
"pycryptodome"
|
||||||
],
|
],
|
||||||
"openai": [],
|
|
||||||
"api": [
|
"api": [
|
||||||
"loguru", "fastapi",
|
"loguru", "fastapi",
|
||||||
"uvicorn", "nest_asyncio"
|
"uvicorn", "nest_asyncio"
|
||||||
|
|
Loading…
Reference in New Issue