KevinHuSh
commited on
Commit
·
cd3f5c7
1
Parent(s):
0e9aa07
fix chunk modification bug (#1011)
Browse files### What problem does this PR solve?
As title.
### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)
api/db/services/llm_service.py
CHANGED
@@ -82,9 +82,9 @@ class TenantLLMService(CommonService):
|
|
82 |
if model_config: model_config = model_config.to_dict()
|
83 |
if not model_config:
|
84 |
if llm_type in [LLMType.EMBEDDING, LLMType.RERANK]:
|
85 |
-
llm = LLMService.query(llm_name=llm_name)
|
86 |
if llm and llm[0].fid in ["Youdao", "FastEmbed", "BAAI"]:
|
87 |
-
model_config = {"llm_factory": llm[0].fid, "api_key":"", "llm_name": llm_name, "api_base": ""}
|
88 |
if not model_config:
|
89 |
if llm_name == "flag-embedding":
|
90 |
model_config = {"llm_factory": "Tongyi-Qianwen", "api_key": "",
|
|
|
82 |
if model_config: model_config = model_config.to_dict()
|
83 |
if not model_config:
|
84 |
if llm_type in [LLMType.EMBEDDING, LLMType.RERANK]:
|
85 |
+
llm = LLMService.query(llm_name=llm_name if llm_name else mdlnm)
|
86 |
if llm and llm[0].fid in ["Youdao", "FastEmbed", "BAAI"]:
|
87 |
+
model_config = {"llm_factory": llm[0].fid, "api_key":"", "llm_name": llm_name if llm_name else mdlnm, "api_base": ""}
|
88 |
if not model_config:
|
89 |
if llm_name == "flag-embedding":
|
90 |
model_config = {"llm_factory": "Tongyi-Qianwen", "api_key": "",
|