zhangjf commited on
Commit
e31a7f4
1 Parent(s): cdeccfb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -111,7 +111,7 @@ def ask(query, max_attempt_times=3):
111
  return answer
112
 
113
 
114
- def askingChatGPT(qs, qas, min_interval_seconds=10, max_interval_seconds=30):
115
 
116
  for i, q in enumerate(qs):
117
  ask_start_time = time.time()
@@ -125,7 +125,7 @@ def askingChatGPT(qs, qas, min_interval_seconds=10, max_interval_seconds=30):
125
  return a
126
  except concurrent.futures.TimeoutError:
127
  print('ask call timed out after', timeout, 'seconds, retrying...')
128
- return ask_(q, timeout*2) # 当超时时,重新调用函数
129
  a = ask_(q, max_interval_seconds)
130
 
131
  qas.append({"q":q, "a":a})
 
111
  return answer
112
 
113
 
114
+ def askingChatGPT(qs, qas, min_interval_seconds=3, max_interval_seconds=30):
115
 
116
  for i, q in enumerate(qs):
117
  ask_start_time = time.time()
 
125
  return a
126
  except concurrent.futures.TimeoutError:
127
  print('ask call timed out after', timeout, 'seconds, retrying...')
128
+ return ask_(q, timeout*2) # 当超时时,重新调用函数
129
  a = ask_(q, max_interval_seconds)
130
 
131
  qas.append({"q":q, "a":a})