3v324v23 commited on
Commit
05c74e6
1 Parent(s): b5c4cd2

多线程限制更正

Browse files
Files changed (1) hide show
  1. crazy_functions/crazy_utils.py +1 -1
crazy_functions/crazy_utils.py CHANGED
@@ -175,7 +175,7 @@ def request_gpt_model_multi_threads_with_very_awesome_ui_and_high_efficiency(
175
  except: max_workers = 8
176
  if max_workers <= 0 or max_workers >= 20: max_workers = 8
177
  # 屏蔽掉 chatglm的多线程,可能会导致严重卡顿
178
- if not llm_kwargs['llm_model'].startswith('gpt-'):
179
  max_workers = 1
180
 
181
  executor = ThreadPoolExecutor(max_workers=max_workers)
 
175
  except: max_workers = 8
176
  if max_workers <= 0 or max_workers >= 20: max_workers = 8
177
  # 屏蔽掉 chatglm的多线程,可能会导致严重卡顿
178
+ if not (llm_kwargs['llm_model'].startswith('gpt-') or llm_kwargs['llm_model'].startswith('api2d-')):
179
  max_workers = 1
180
 
181
  executor = ThreadPoolExecutor(max_workers=max_workers)