Merge remote-tracking branch 'origin' into feat/rag-eval
This commit is contained in:
commit
6f630782e1
@ -37,7 +37,7 @@ class Config(BaseModel):
|
||||
enable_content_guard: bool = Field(default=False, description="是否启用内容审查")
|
||||
|
||||
# 模型配置
|
||||
default_model: str = Field(default="siliconflow/deepseek-ai/DeepSeek-V3.2-Exp")
|
||||
default_model: str = Field(default="siliconflow/deepseek-ai/DeepSeek-V3.2")
|
||||
embed_model: str = Field(default="siliconflow/BAAI/bge-m3")
|
||||
|
||||
# 运行时状态 (不持久化)
|
||||
@ -105,10 +105,10 @@ DEFAULT_CHAT_MODEL_PROVIDERS: dict[str, ChatModelProvider] = {
|
||||
name="SiliconFlow",
|
||||
url="https://cloud.siliconflow.cn/models",
|
||||
base_url="https://api.siliconflow.cn/v1",
|
||||
default="deepseek-ai/DeepSeek-V3.2-Exp",
|
||||
default="deepseek-ai/DeepSeek-V3.2",
|
||||
env="SILICONFLOW_API_KEY",
|
||||
models=[
|
||||
"deepseek-ai/DeepSeek-V3.2-Exp",
|
||||
"deepseek-ai/DeepSeek-V3.2",
|
||||
"Qwen/Qwen3-235B-A22B-Instruct-2507",
|
||||
# ...
|
||||
],
|
||||
@ -130,7 +130,7 @@ enable_content_guard = true
|
||||
# 模型配置修改
|
||||
[model_names.siliconflow]
|
||||
models = [
|
||||
"deepseek-ai/DeepSeek-V3.2-Exp",
|
||||
"deepseek-ai/DeepSeek-V3.2",
|
||||
"custom-model-name",
|
||||
]
|
||||
```
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
系统的默认对话模型通过配置项 `default_model` 指定,格式统一为 `模型提供商/模型名称`,例如:
|
||||
|
||||
```yaml
|
||||
default_model: siliconflow/deepseek-ai/DeepSeek-V3.2-Exp
|
||||
default_model: siliconflow/deepseek-ai/DeepSeek-V3.2
|
||||
```
|
||||
|
||||
在 Web 界面中选择模型时也会自动按照这一格式保存。
|
||||
|
||||
@ -47,7 +47,7 @@ class Config(BaseModel):
|
||||
# 模型配置
|
||||
# ============================================================
|
||||
default_model: str = Field(
|
||||
default="siliconflow/deepseek-ai/DeepSeek-V3.2-Exp",
|
||||
default="siliconflow/deepseek-ai/DeepSeek-V3.2",
|
||||
description="默认对话模型",
|
||||
)
|
||||
fast_model: str = Field(
|
||||
|
||||
@ -73,10 +73,10 @@ DEFAULT_CHAT_MODEL_PROVIDERS: dict[str, ChatModelProvider] = {
|
||||
name="SiliconFlow",
|
||||
url="https://cloud.siliconflow.cn/models",
|
||||
base_url="https://api.siliconflow.cn/v1",
|
||||
default="deepseek-ai/DeepSeek-V3.2-Exp",
|
||||
default="deepseek-ai/DeepSeek-V3.2",
|
||||
env="SILICONFLOW_API_KEY",
|
||||
models=[
|
||||
"deepseek-ai/DeepSeek-V3.2-Exp",
|
||||
"deepseek-ai/DeepSeek-V3.2",
|
||||
"Qwen/Qwen3-235B-A22B-Thinking-2507",
|
||||
"Qwen/Qwen3-235B-A22B-Instruct-2507",
|
||||
"moonshotai/Kimi-K2-Instruct-0905",
|
||||
@ -146,9 +146,9 @@ DEFAULT_CHAT_MODEL_PROVIDERS: dict[str, ChatModelProvider] = {
|
||||
name="ModelScope",
|
||||
url="https://www.modelscope.cn/docs/model-service/API-Inference/intro",
|
||||
base_url="https://api-inference.modelscope.cn/v1/",
|
||||
default="deepseek-ai/DeepSeek-V3.2-Exp",
|
||||
default="deepseek-ai/DeepSeek-V3.2",
|
||||
env="MODELSCOPE_ACCESS_TOKEN",
|
||||
models=["Qwen/Qwen3-32B", "deepseek-ai/DeepSeek-V3.2-Exp"],
|
||||
models=["Qwen/Qwen3-32B", "deepseek-ai/DeepSeek-V3.2"],
|
||||
),
|
||||
}
|
||||
|
||||
|
||||
@ -201,7 +201,7 @@ class LightRagKB(KnowledgeBase):
|
||||
"""获取 embedding 函数"""
|
||||
config_dict = get_embedding_config(embed_info)
|
||||
|
||||
if config_dict["model_id"].startswith("ollama"):
|
||||
if config_dict.get("model_id") and config_dict["model_id"].startswith("ollama"):
|
||||
from lightrag.llm.ollama import ollama_embed
|
||||
|
||||
from src.utils import get_docker_safe_url
|
||||
|
||||
Loading…
Reference in New Issue
Block a user