add timeout=30s
Browse files
app.py
CHANGED
@@ -125,7 +125,7 @@ def askingChatGPT(qs, qas, min_interval_seconds=3, max_interval_seconds=30):
|
|
125 |
return a
|
126 |
except concurrent.futures.TimeoutError:
|
127 |
print('ask call timed out after', timeout, 'seconds, retrying...')
|
128 |
-
executor.shutdown(wait=False
|
129 |
return ask_(q, timeout*2) # 当超时时,重新调用函数
|
130 |
a = ask_(q, max_interval_seconds)
|
131 |
|
|
|
125 |
return a
|
126 |
except concurrent.futures.TimeoutError:
|
127 |
print('ask call timed out after', timeout, 'seconds, retrying...')
|
128 |
+
executor.shutdown(wait=False)
|
129 |
return ask_(q, timeout*2) # 当超时时,重新调用函数
|
130 |
a = ask_(q, max_interval_seconds)
|
131 |
|