feat(model): 更新 DeepSeek 模型版本至 V4-Flash,调整相关文档和配置
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
parent
a8eb5ab6fe
commit
97abed8f96
@ -22,7 +22,7 @@ class DeepContext(BaseContext):
|
|||||||
)
|
)
|
||||||
|
|
||||||
subagents_model: Annotated[str, {"__template_metadata__": {"kind": "llm"}}] = field(
|
subagents_model: Annotated[str, {"__template_metadata__": {"kind": "llm"}}] = field(
|
||||||
default="siliconflow/Pro/deepseek-ai/DeepSeek-V3.2",
|
default="siliconflow-cn:deepseek-ai/DeepSeek-V4-Flash",
|
||||||
metadata={
|
metadata={
|
||||||
"name": "Sub-agent Model",
|
"name": "Sub-agent Model",
|
||||||
"description": "子智能体的默认模型,会被子智能体的配置覆盖。",
|
"description": "子智能体的默认模型,会被子智能体的配置覆盖。",
|
||||||
|
|||||||
@ -13,7 +13,7 @@ from yuxi.utils.logging_config import logger
|
|||||||
def load_chat_model_v2(spec: str, **kwargs) -> BaseChatModel:
|
def load_chat_model_v2(spec: str, **kwargs) -> BaseChatModel:
|
||||||
"""根据 v2 spec(provider_id:model_id)加载 LangChain 聊天模型。
|
"""根据 v2 spec(provider_id:model_id)加载 LangChain 聊天模型。
|
||||||
|
|
||||||
v2 spec 格式使用冒号分隔,如: siliconflow-cn:Pro/deepseek-ai/DeepSeek-V3.2
|
v2 spec 格式使用冒号分隔,如: siliconflow-cn:deepseek-ai/DeepSeek-V4-Flash
|
||||||
数据来源为数据库中的 model_providers 表,通过全局缓存访问。
|
数据来源为数据库中的 model_providers 表,通过全局缓存访问。
|
||||||
"""
|
"""
|
||||||
from yuxi.services.model_cache import model_cache
|
from yuxi.services.model_cache import model_cache
|
||||||
|
|||||||
@ -155,7 +155,7 @@ BUILTIN_PROVIDERS: list[dict[str, Any]] = [
|
|||||||
"embedding_models_endpoint": "https://api.siliconflow.cn/v1/models?sub_type=embedding",
|
"embedding_models_endpoint": "https://api.siliconflow.cn/v1/models?sub_type=embedding",
|
||||||
"rerank_models_endpoint": "https://api.siliconflow.cn/v1/models?sub_type=reranker",
|
"rerank_models_endpoint": "https://api.siliconflow.cn/v1/models?sub_type=reranker",
|
||||||
"enabled_models": [
|
"enabled_models": [
|
||||||
{"id": "Pro/deepseek-ai/DeepSeek-V3.2", "type": "chat", "display_name": "Pro/deepseek-ai/DeepSeek-V3.2"},
|
{"id": "deepseek-ai/DeepSeek-V4-Flash", "type": "chat", "display_name": "deepseek-ai/DeepSeek-V4-Flash"},
|
||||||
{"id": "Pro/MiniMaxAI/MiniMax-M2.5", "type": "chat", "display_name": "Pro/MiniMaxAI/MiniMax-M2.5"},
|
{"id": "Pro/MiniMaxAI/MiniMax-M2.5", "type": "chat", "display_name": "Pro/MiniMaxAI/MiniMax-M2.5"},
|
||||||
{
|
{
|
||||||
"id": "Pro/BAAI/bge-m3",
|
"id": "Pro/BAAI/bge-m3",
|
||||||
|
|||||||
@ -104,7 +104,7 @@ class GeneralResponse:
|
|||||||
def select_model_v2(spec: str) -> OpenAIBase:
|
def select_model_v2(spec: str) -> OpenAIBase:
|
||||||
"""根据 v2 spec(provider_id:model_id)选择聊天模型。
|
"""根据 v2 spec(provider_id:model_id)选择聊天模型。
|
||||||
|
|
||||||
v2 spec 格式使用冒号分隔,如: siliconflow-cn:Pro/deepseek-ai/DeepSeek-V3.2
|
v2 spec 格式使用冒号分隔,如: siliconflow-cn:deepseek-ai/DeepSeek-V4-Flash
|
||||||
数据来源为数据库中的 model_providers 表,通过全局缓存访问。
|
数据来源为数据库中的 model_providers 表,通过全局缓存访问。
|
||||||
"""
|
"""
|
||||||
from yuxi.services.model_cache import model_cache
|
from yuxi.services.model_cache import model_cache
|
||||||
|
|||||||
@ -45,13 +45,13 @@ class Config(BaseModel):
|
|||||||
enable_content_guard: bool = Field(default=False, description="是否启用内容审查")
|
enable_content_guard: bool = Field(default=False, description="是否启用内容审查")
|
||||||
|
|
||||||
# 模型配置
|
# 模型配置
|
||||||
default_model: str = Field(default="siliconflow/Pro/deepseek-ai/DeepSeek-V3.2")
|
default_model: str = Field(default="siliconflow-cn:deepseek-ai/DeepSeek-V4-Flash")
|
||||||
embed_model: str = Field(default="siliconflow/BAAI/bge-m3")
|
embed_model: str = Field(default="siliconflow-cn:BAAI/bge-m3")
|
||||||
```
|
```
|
||||||
|
|
||||||
### 模型配置
|
### 模型配置
|
||||||
|
|
||||||
模型配置独立管理,支持多种模型提供商:
|
模型配置独立管理,支持多种模型提供商:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
DEFAULT_CHAT_MODEL_PROVIDERS: dict[str, ChatModelProvider] = {
|
DEFAULT_CHAT_MODEL_PROVIDERS: dict[str, ChatModelProvider] = {
|
||||||
@ -59,9 +59,9 @@ DEFAULT_CHAT_MODEL_PROVIDERS: dict[str, ChatModelProvider] = {
|
|||||||
name="SiliconFlow",
|
name="SiliconFlow",
|
||||||
url="https://cloud.siliconflow.cn/models",
|
url="https://cloud.siliconflow.cn/models",
|
||||||
base_url="https://api.siliconflow.cn/v1",
|
base_url="https://api.siliconflow.cn/v1",
|
||||||
default="deepseek-ai/DeepSeek-V3.2",
|
default="deepseek-ai/DeepSeek-V4-Flash",
|
||||||
env="SILICONFLOW_API_KEY",
|
env="SILICONFLOW_API_KEY",
|
||||||
models=["deepseek-ai/DeepSeek-V3.2", "Qwen/Qwen3-235B-A22B-Instruct-2507"],
|
models=["deepseek-ai/DeepSeek-V4-Flash", "Qwen/Qwen3-235B-A22B-Instruct-2507"],
|
||||||
),
|
),
|
||||||
# 其他提供商...
|
# 其他提供商...
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user