修改判断是否具有推理能力代码
This commit is contained in:
parent
607e7f2a48
commit
705064d747
|
|
@ -1416,20 +1416,37 @@ for model in [m for m in AVAIL_LLM_MODELS if m.startswith("siliconflow-")]:
|
||||||
)
|
)
|
||||||
# 判断是否具有推理能力
|
# 判断是否具有推理能力
|
||||||
enable_reasoning = any(item in model for item in inference_model_series)
|
enable_reasoning = any(item in model for item in inference_model_series)
|
||||||
model_info.update(
|
if enable_reasoning:
|
||||||
{
|
model_info.update(
|
||||||
model: {
|
{
|
||||||
"fn_with_ui": siliconflow_ui,
|
model: {
|
||||||
"fn_without_ui": siliconflow_noui,
|
"fn_with_ui": siliconflow_ui,
|
||||||
"endpoint": siliconflow_endpoint,
|
"fn_without_ui": siliconflow_noui,
|
||||||
"can_multi_thread": True,
|
"endpoint": siliconflow_endpoint,
|
||||||
"max_token": 32000,
|
"can_multi_thread": True,
|
||||||
"tokenizer": tokenizer_gpt35,
|
"max_token": 32000,
|
||||||
"token_cnt": get_token_num_gpt35,
|
"tokenizer": tokenizer_gpt35,
|
||||||
"enable_reasoning": enable_reasoning,
|
"token_cnt": get_token_num_gpt35,
|
||||||
},
|
"enable_reasoning": True,
|
||||||
}
|
},
|
||||||
)
|
}
|
||||||
|
)
|
||||||
|
logger.info(f" siliconflow模型 {model} 已加载")
|
||||||
|
else:
|
||||||
|
model_info.update(
|
||||||
|
{
|
||||||
|
model: {
|
||||||
|
"fn_with_ui": siliconflow_ui,
|
||||||
|
"fn_without_ui": siliconflow_noui,
|
||||||
|
"endpoint": siliconflow_endpoint,
|
||||||
|
"can_multi_thread": True,
|
||||||
|
"max_token": 32000,
|
||||||
|
"tokenizer": tokenizer_gpt35,
|
||||||
|
"token_cnt": get_token_num_gpt35,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
)
|
||||||
|
logger.info(f" siliconflow模型 {model} 已加载")
|
||||||
except:
|
except:
|
||||||
logger.error(trimmed_format_exc())
|
logger.error(trimmed_format_exc())
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue