feat:统一replyer在是否多模态下的表现,提高一致性和通用性,新增模型visual参数

This commit is contained in:
SengokuCola
2026-04-11 16:41:00 +08:00
parent 3ea2bf1059
commit c0230fc313
20 changed files with 323 additions and 1802 deletions

View File

@@ -55,7 +55,7 @@ BOT_CONFIG_PATH: Path = (CONFIG_DIR / "bot_config.toml").resolve().absolute()
MODEL_CONFIG_PATH: Path = (CONFIG_DIR / "model_config.toml").resolve().absolute()
MMC_VERSION: str = "1.0.0"
CONFIG_VERSION: str = "8.5.5"
MODEL_CONFIG_VERSION: str = "1.13.1"
MODEL_CONFIG_VERSION: str = "1.14.0"
logger = get_logger("config")

View File

@@ -307,6 +307,15 @@ class ModelInfo(ConfigBase):
)
"""强制流式输出模式 (若模型不支持非流式输出, 请设置为true启用强制流式输出, 默认值为false)"""
visual: bool = Field(
default=False,
json_schema_extra={
"x-widget": "switch",
"x-icon": "image",
},
)
"""是否为多模态模型。开启后表示该模型支持视觉输入。"""
extra_params: dict[str, Any] = Field(
default_factory=dict,
json_schema_extra={
@@ -437,4 +446,4 @@ class ModelTaskConfig(ConfigBase):
"x-icon": "database",
},
)
"""嵌入模型配置"""
"""嵌入模型配置"""