fix:修复模型误用

This commit is contained in:
SengokuCola
2026-05-03 15:36:10 +08:00
parent 03ac8b30f3
commit 0252daf82a
3 changed files with 7 additions and 3 deletions

View File

@@ -3259,7 +3259,6 @@ class ImportTaskManager:
for task_name in [
"lpmm_entity_extract",
"lpmm_rdf_build",
"embedding",
"replyer",
"utils",
"planner",

View File

@@ -57,7 +57,7 @@ MODEL_CONFIG_PATH: Path = (CONFIG_DIR / "model_config.toml").resolve().absolute(
LEGACY_ENV_PATH: Path = (PROJECT_ROOT / ".env").resolve().absolute()
MMC_VERSION: str = "1.0.0"
CONFIG_VERSION: str = "8.9.20"
MODEL_CONFIG_VERSION: str = "1.14.5"
MODEL_CONFIG_VERSION: str = "1.14.6"
logger = get_logger("config")

View File

@@ -343,7 +343,12 @@ class ModelInfo(ConfigBase):
"x-icon": "sliders",
},
)
"""额外参数 (用于API调用时的额外配置)"""
"""额外参数 (用于API调用时的额外配置)
OpenAI 兼容客户端会将该字典拆分为请求附加项headers 会作为请求头传入query 会作为 URL 查询参数传入body 会合并到请求体。
未放入 headers/query/body 的普通键,也会作为请求体额外字段传入;例如 {enable_thinking = "false"} 会传为请求体字段 enable_thinking。
该字段不会以 extra_params 这个键整体发送给模型服务商。
temperature 和 max_tokens 也可写在此处作为模型级默认值,但更推荐使用同名独立配置项。
Gemini 客户端会按自身支持的字段筛选并映射到 GenerateContentConfig、EmbedContentConfig 或音频请求配置中。"""
def model_post_init(self, context: Any = None):
if not self.model_identifier: