XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 1
返回提交历史

XFEstudio/gpt4free

~

c8835b15
abc <98614666+xtekky@users.noreply.github.com>
提交于

代码差异

2 个文件 +6 -2
Modified .gitignore +2 -0
@@ -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 *~
Modified g4f/Provider/Bing.py +4 -2
@@ -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]