返回提交历史
Modified
g4f/Provider/needs_auth/OpenaiChat.py
+2
-2
Modified
requirements.txt
+1
-1
Modified
setup.py
+16
-8
XFEstudio/gpt4free
Fix attr conversation_id not found
d0da5900
代码差异
3 个文件
+19
-11
@@ -392,8 +392,8 @@ class OpenaiChat(AsyncGeneratorProvider, ProviderModelMixin):
392
392
fields = Conversation() if conversation is None else copy(conversation)
393
393
fields.finish_reason = None
394
394
while fields.finish_reason is None:
395
conversation_id = conversation_id if fields.conversation_id is None else fields.conversation_id
396
parent_id = parent_id if fields.message_id is None else fields.message_id
395
conversation_id = fields.conversation_id if hasattr(fields, "conversation_id") else conversation_id
396
parent_id = fields.message_id if hasattr(fields, "message_id") else parent_id
397
397
websocket_request_id = str(uuid.uuid4())
398
398
data = {
399
399
"action": action,
@@ -20,4 +20,4 @@ aiohttp_socks
20
20
gpt4all
21
21
pywebview
22
22
plyer
23
pycryptodome
23
cryptography
@@ -20,22 +20,27 @@ EXTRA_REQUIRE = {
20
20
"curl_cffi>=0.6.2",
21
21
"certifi",
22
22
"browser_cookie3", # get_cookies
23
"PyExecJS", # GptForLove
23
"PyExecJS", # GptForLove, Vercel
24
24
"duckduckgo-search>=5.0" ,# internet.search
25
25
"beautifulsoup4", # internet.search and bing.create_images
26
"brotli", # openai
27
#"undetected-chromedriver>=3.5.5", # webdriver
28
#"setuptools", # webdriver
26
"brotli", # openai, bing
27
# webdriver
28
#"undetected-chromedriver>=3.5.5",
29
#"setuptools",
30
#"selenium-wire"
31
# webview
29
32
"pywebview",
30
33
"platformdirs",
31
34
"plyer",
35
"cryptography",
36
####
32
37
"aiohttp_socks", # proxy
33
38
"pillow", # image
34
39
"cairosvg", # svg image
35
40
"werkzeug", "flask", # gui
36
"loguru", "fastapi",
41
"loguru", "fastapi", # api
37
42
"uvicorn", "nest_asyncio", # api
38
#"selenium-wire"
43
"pycryptodome" # openai
39
44
],
40
45
"image": [
41
46
"pillow",
@@ -51,9 +56,12 @@ EXTRA_REQUIRE = {
51
56
"webview": [
52
57
"webview",
53
58
"platformdirs",
54
"plyer"
59
"plyer",
60
"cryptography"
61
],
62
"openai": [
63
"pycryptodome"
55
64
],
56
"openai": [],
57
65
"api": [
58
66
"loguru", "fastapi",
59
67
"uvicorn", "nest_asyncio"