fix: using embd which user configured at knowledgebase (#1163)

### What problem does this PR solve?
as title
### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Wang Baoling
2024-06-19 14:44:25 +08:00
committed by GitHub
parent fe1805fa0e
commit 0b90aab22c
2 changed files with 17 additions and 1 deletions

View File

@ -136,8 +136,11 @@ def set():
tenant_id = DocumentService.get_tenant_id(req["doc_id"])
if not tenant_id:
return get_data_error_result(retmsg="Tenant not found!")
embd_id = DocumentService.get_embd_id(req["doc_id"])
embd_mdl = TenantLLMService.model_instance(
tenant_id, LLMType.EMBEDDING.value)
tenant_id, LLMType.EMBEDDING.value, embd_id)
e, doc = DocumentService.get_by_id(req["doc_id"])
if not e:
return get_data_error_result(retmsg="Document not found!")