qingxu99 commited on
Commit
73ce471
1 Parent(s): 4e11313

max_worker_limit

Browse files
Files changed (1) hide show
  1. crazy_functions/crazy_utils.py +1 -1
crazy_functions/crazy_utils.py CHANGED
@@ -172,7 +172,7 @@ def request_gpt_model_multi_threads_with_very_awesome_ui_and_high_efficiency(
172
  if max_workers == -1: # 读取配置文件
173
  try: max_workers, = get_conf('DEFAULT_WORKER_NUM')
174
  except: max_workers = 8
175
- if max_workers <= 0 or max_workers >= 20: max_workers = 8
176
  # 屏蔽掉 chatglm的多线程,可能会导致严重卡顿
177
  if not (llm_kwargs['llm_model'].startswith('gpt-') or llm_kwargs['llm_model'].startswith('api2d-')):
178
  max_workers = 1
 
172
  if max_workers == -1: # 读取配置文件
173
  try: max_workers, = get_conf('DEFAULT_WORKER_NUM')
174
  except: max_workers = 8
175
+ if max_workers <= 0: max_workers = 3
176
  # 屏蔽掉 chatglm的多线程,可能会导致严重卡顿
177
  if not (llm_kwargs['llm_model'].startswith('gpt-') or llm_kwargs['llm_model'].startswith('api2d-')):
178
  max_workers = 1