Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -37,7 +37,7 @@ async def get_model_reply(prompt,style,cookies,context=[]):
|
|
37 |
print(raw_data)
|
38 |
|
39 |
except Exception as e:
|
40 |
-
print(f">>>>>> 报错信息:\t -----> 【{e}
|
41 |
if "throttled" in str(e):
|
42 |
response = "> **错误: 我们很抱歉,但你已经达到了你在24小时内可以向Bing发送消息的最大数量。请稍后再查看!**"
|
43 |
print(response)
|
@@ -45,6 +45,14 @@ async def get_model_reply(prompt,style,cookies,context=[]):
|
|
45 |
responses = [(u, b) for u, b in zip(context[::2], context[1::2])]
|
46 |
return responses, context
|
47 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
try:
|
49 |
response = raw_data["item"]["messages"][1]["text"]
|
50 |
except:
|
|
|
37 |
print(raw_data)
|
38 |
|
39 |
except Exception as e:
|
40 |
+
print(f">>>>>> 报错信息:\t -----> 【{e}】\n")
|
41 |
if "throttled" in str(e):
|
42 |
response = "> **错误: 我们很抱歉,但你已经达到了你在24小时内可以向Bing发送消息的最大数量。请稍后再查看!**"
|
43 |
print(response)
|
|
|
45 |
responses = [(u, b) for u, b in zip(context[::2], context[1::2])]
|
46 |
return responses, context
|
47 |
|
48 |
+
if "CAPTCHA" in str(e):
|
49 |
+
response = "> **错误: 账号需要人机验证。请登录聊天页面进行验证**"
|
50 |
+
print(response)
|
51 |
+
context += ["-2"]
|
52 |
+
responses = [(u, b) for u, b in zip(context[::2], context[1::2])]
|
53 |
+
return responses, context
|
54 |
+
|
55 |
+
|
56 |
try:
|
57 |
response = raw_data["item"]["messages"][1]["text"]
|
58 |
except:
|