Spaces:
Runtime error
Runtime error
justest
commited on
Commit
·
fd346ee
1
Parent(s):
492400e
update default sdk
Browse files- README.md +3 -0
- g4f/Provider/Providers/Bing.py +25 -21
README.md
CHANGED
@@ -4,6 +4,9 @@ sdk: gradio
|
|
4 |
emoji: 💻
|
5 |
colorFrom: gray
|
6 |
colorTo: blue
|
|
|
|
|
|
|
7 |
---
|
8 |
|
9 |
![image](https://github.com/onlpx/gpt4free-v2/assets/98614666/7886223b-c1d1-4260-82aa-da5741f303bb)
|
|
|
4 |
emoji: 💻
|
5 |
colorFrom: gray
|
6 |
colorTo: blue
|
7 |
+
sdk: gradio
|
8 |
+
sdk_version: 3.36.0
|
9 |
+
app_file: app.py
|
10 |
---
|
11 |
|
12 |
![image](https://github.com/onlpx/gpt4free-v2/assets/98614666/7886223b-c1d1-4260-82aa-da5741f303bb)
|
g4f/Provider/Providers/Bing.py
CHANGED
@@ -122,27 +122,31 @@ async def create_conversation():
|
|
122 |
for _ in range(5):
|
123 |
create = requests.get('https://www.bing.com/turing/conversation/create',
|
124 |
headers={
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
|
|
|
|
|
|
|
|
146 |
})
|
147 |
|
148 |
conversationId = create.json().get('conversationId')
|
|
|
122 |
for _ in range(5):
|
123 |
create = requests.get('https://www.bing.com/turing/conversation/create',
|
124 |
headers={
|
125 |
+
'accept': 'application/json',
|
126 |
+
'accept-language': 'zh-CN,zh;q=0.9',
|
127 |
+
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.1823.58',
|
128 |
+
'x-ms-useragent': 'azsdk-js-api-client-factory/1.0.0-beta.1 core-rest-pipeline/1.10.0 OS/MacIntel',
|
129 |
+
# 'authority': 'edgeservices.bing.com',
|
130 |
+
# 'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7',
|
131 |
+
# 'accept-language': 'en-US,en;q=0.9',
|
132 |
+
# 'cache-control': 'max-age=0',
|
133 |
+
# 'sec-ch-ua': '"Chromium";v="110", "Not A(Brand";v="24", "Microsoft Edge";v="110"',
|
134 |
+
# 'sec-ch-ua-arch': '"x86"',
|
135 |
+
# 'sec-ch-ua-bitness': '"64"',
|
136 |
+
# 'sec-ch-ua-full-version': '"110.0.1587.69"',
|
137 |
+
# 'sec-ch-ua-full-version-list': '"Chromium";v="110.0.5481.192", "Not A(Brand";v="24.0.0.0", "Microsoft Edge";v="110.0.1587.69"',
|
138 |
+
# 'sec-ch-ua-mobile': '?0',
|
139 |
+
# 'sec-ch-ua-model': '""',
|
140 |
+
# 'sec-ch-ua-platform': '"Windows"',
|
141 |
+
# 'sec-ch-ua-platform-version': '"15.0.0"',
|
142 |
+
# 'sec-fetch-dest': 'document',
|
143 |
+
# 'sec-fetch-mode': 'navigate',
|
144 |
+
# 'sec-fetch-site': 'none',
|
145 |
+
# 'sec-fetch-user': '?1',
|
146 |
+
# 'upgrade-insecure-requests': '1',
|
147 |
+
# 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36 Edg/110.0.1587.69',
|
148 |
+
# 'x-edge-shopping-flag': '1',
|
149 |
+
# 'x-forwarded-for': Defaults.ip_address
|
150 |
})
|
151 |
|
152 |
conversationId = create.json().get('conversationId')
|