提取操作使用千问plus大模型

This commit is contained in:
wh
2026-04-17 01:22:05 +08:00
parent d34f703523
commit 3a60d8cb33
8 changed files with 196 additions and 22 deletions

View File

@@ -1,7 +1,7 @@
from functools import lru_cache
from app.clients.llm.base import LLMClient
from app.clients.llm.zhipuai_client import ZhipuAIClient
from app.clients.llm.qwen_client import QwenClient
from app.clients.storage.base import StorageClient
from app.clients.storage.rustfs_client import RustFSClient
from app.core.config import get_config
@@ -10,7 +10,12 @@ from app.core.config import get_config
@lru_cache(maxsize=1)
def get_llm_client() -> LLMClient:
cfg = get_config()
return ZhipuAIClient(api_key=cfg["zhipuai"]["api_key"])
dashscope_cfg = cfg["dashscope"]
return QwenClient(
api_key=dashscope_cfg["api_key"],
base_url=dashscope_cfg.get("base_url", "https://dashscope.aliyuncs.com/compatible-mode/v1"),
fine_tune_base_url=dashscope_cfg.get("fine_tune_base_url"),
)
@lru_cache(maxsize=1)