xiaolv commited on
Commit
4fc48ee
1 Parent(s): 10214ac

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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
- times = 3
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():