浏览代码

Fix: model type error. (#9308)

### What problem does this PR solve?

#9240

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.20.1
Kevin Hu 2 个月前
父节点
当前提交
5749aa30b0
没有帐户链接到提交者的电子邮件
共有 2 个文件被更改,包括 4 次插入1 次删除
  1. 1
    1
      agent/tools/retrieval.py
  2. 3
    0
      api/db/services/llm_service.py

+ 1
- 1
agent/tools/retrieval.py 查看文件

@@ -86,7 +86,7 @@ class Retrieval(ToolBase, ABC):
kb_ids.append(id)
continue
kb_nm = self._canvas.get_variable_value(id)
e, kb = KnowledgebaseService.get_by_name(kb_nm)
e, kb = KnowledgebaseService.get_by_name(kb_nm, self._canvas._tenant_id)
if not e:
raise Exception(f"Dataset({kb_nm}) does not exist.")
kb_ids.append(kb.id)

+ 3
- 0
api/db/services/llm_service.py 查看文件

@@ -225,6 +225,9 @@ class TenantLLMService(CommonService):
if llm_id == llm["llm_name"]:
return llm["model_type"].split(",")[-1]

for llm in TenantLLMService.query(llm_name=llm_id):
return llm.model_type

for llm in LLMService.query(llm_name=llm_id):
return llm.model_type


正在加载...
取消
保存