Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ import gradio as gr
|
|
3 |
|
4 |
def request_to_v2(message, cookie, user_id, channel_id,context=[]):
|
5 |
|
6 |
-
|
7 |
context = [message]
|
8 |
headers = {
|
9 |
# ':Authority': 'claude.ai',
|
@@ -43,7 +43,7 @@ def request_to_v2(message, cookie, user_id, channel_id,context=[]):
|
|
43 |
print(post_msg_data)
|
44 |
|
45 |
try:
|
46 |
-
response = requests.post(post_msg_url, headers=headers, data=post_msg_data, verify=False, stream=False)
|
47 |
bots = ""
|
48 |
print("a"*100)
|
49 |
for data in response.iter_lines():
|
|
|
3 |
|
4 |
def request_to_v2(message, cookie, user_id, channel_id,context=[]):
|
5 |
|
6 |
+
timeout = 5*60 #5分钟不回复,显示超时
|
7 |
context = [message]
|
8 |
headers = {
|
9 |
# ':Authority': 'claude.ai',
|
|
|
43 |
print(post_msg_data)
|
44 |
|
45 |
try:
|
46 |
+
response = requests.post(post_msg_url, headers=headers, data=post_msg_data, verify=False, stream=False,timeout = timeout)
|
47 |
bots = ""
|
48 |
print("a"*100)
|
49 |
for data in response.iter_lines():
|