From 2a5d6e20cfeb026d58eb0712dfe38d38eb7d8ed6 Mon Sep 17 00:00:00 2001 From: Samon Yu Date: Thu, 17 Apr 2025 22:42:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A1=85=E5=9F=BA=E6=99=BA?= =?UTF-8?q?=E8=83=BD=E6=A8=A1=E5=9E=8B=E6=8E=A8=E7=90=86=E8=83=BD=E5=8A=9B?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- request_llms/bridge_all.py | 47 ++++++++++++-------------------------- 1 file changed, 15 insertions(+), 32 deletions(-) diff --git a/request_llms/bridge_all.py b/request_llms/bridge_all.py index 5bec7e69..13263c47 100644 --- a/request_llms/bridge_all.py +++ b/request_llms/bridge_all.py @@ -1409,44 +1409,27 @@ for model in [m for m in AVAIL_LLM_MODELS if m.startswith("siliconflow-")]: try: siliconflow_noui, siliconflow_ui = get_predict_function( api_key_conf_name="SILICONFLOW_API_KEY", - max_output_token=8192, + # max_tokens 的说明:https://docs.siliconflow.cn/cn/faqs/misc + max_output_token=4096, disable_proxy=False, # 去除前缀 model_remove_prefix = ["siliconflow-"] ) # 判断是否具有推理能力 enable_reasoning = any(item in model for item in inference_model_series) - if enable_reasoning: - 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, - "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} 已加载") + model_info.update( + { + model: { + "fn_with_ui": siliconflow_ui, + "fn_without_ui": siliconflow_noui, + "endpoint": siliconflow_endpoint, + "can_multi_thread": True, + "enable_reasoning": enable_reasoning, + }, + } + ) + logger.info(f" siliconflow 模型 {model} 已加载") + except: logger.error(trimmed_format_exc())