返回提交历史
Modified
.gitignore
+2
-0
Modified
g4f/Provider/Bing.py
+4
-2
XFEstudio/gpt4free
~
c8835b15
代码差异
2 个文件
+6
-2
@@ -37,5 +37,7 @@ close_issues.py
37
37
xxx.py
38
38
lab.py
39
39
lab.js
40
bing.py
41
bing2.py
40
42
# Emacs crap
41
43
*~
@@ -60,9 +60,11 @@ class Conversation():
60
60
self.conversationSignature = conversationSignature
61
61
62
62
async def create_conversation(session: ClientSession) -> Conversation:
63
url = 'https://www.bing.com/turing/conversation/create'
63
url = 'https://www.bing.com/turing/conversation/create?bundleVersion=1.1150.3'
64
64
65
async with await session.get(url) as response:
65
66
data = await response.json()
67
66
68
conversationId = data.get('conversationId')
67
69
clientId = data.get('clientId')
68
70
conversationSignature = response.headers.get('X-Sydney-Encryptedconversationsignature')
@@ -267,7 +269,7 @@ async def stream_generate(
267
269
for obj in objects:
268
270
if obj is None or not obj:
269
271
continue
270
272
271
273
response = json.loads(obj)
272
274
if response.get('type') == 1 and response['arguments'][0].get('messages'):
273
275
message = response['arguments'][0]['messages'][0]