Spaces:
Paused
Paused
更新提示
Browse files- config.py +2 -1
- crazy_functions/crazy_utils.py +1 -1
config.py
CHANGED
@@ -19,7 +19,8 @@ if USE_PROXY:
|
|
19 |
else:
|
20 |
proxies = None
|
21 |
|
22 |
-
# 多线程函数插件中,默认允许多少路线程同时访问OpenAI。
|
|
|
23 |
# https://platform.openai.com/docs/guides/rate-limits/overview
|
24 |
DEFAULT_WORKER_NUM = 3
|
25 |
|
|
|
19 |
else:
|
20 |
proxies = None
|
21 |
|
22 |
+
# 多线程函数插件中,默认允许多少路线程同时访问OpenAI。
|
23 |
+
# Free trial users的限制是每分钟3次,Pay-as-you-go users的限制是每分钟3500次。提高限制请查询:
|
24 |
# https://platform.openai.com/docs/guides/rate-limits/overview
|
25 |
DEFAULT_WORKER_NUM = 3
|
26 |
|
crazy_functions/crazy_utils.py
CHANGED
@@ -228,7 +228,7 @@ def request_gpt_model_multi_threads_with_very_awesome_ui_and_high_efficiency(
|
|
228 |
retry_op -= 1
|
229 |
wait = random.randint(5, 20)
|
230 |
if "Rate limit reached" in tb_str:
|
231 |
-
wait = wait *
|
232 |
fail_info = "OpenAI请求速率限制 "
|
233 |
else:
|
234 |
fail_info = ""
|
|
|
228 |
retry_op -= 1
|
229 |
wait = random.randint(5, 20)
|
230 |
if "Rate limit reached" in tb_str:
|
231 |
+
wait = wait * 3
|
232 |
fail_info = "OpenAI请求速率限制 "
|
233 |
else:
|
234 |
fail_info = ""
|