From 42a7b4b2f4be659224687fe67a6b711153f3cec4 Mon Sep 17 00:00:00 2001 From: NingLyu Date: Wed, 4 Dec 2024 09:38:52 +0000 Subject: [PATCH] fix: update embedding condition --- source/lambda/intention/intention.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/lambda/intention/intention.py b/source/lambda/intention/intention.py index 8c050305..928011fb 100644 --- a/source/lambda/intention/intention.py +++ b/source/lambda/intention/intention.py @@ -418,7 +418,7 @@ def convert_qa_list(qa_list: list, bucket: str, prefix: str) -> List[Document]: def __save_2_aos(modelId: str, index: str, qaListParam: list, bucket: str, prefix: str): qaList = __deduplicate_by_key(qaListParam, "question") - if kb_enabled: + if kb_enabled and embedding_model_endpoint.startswith("bce-embedding"): embedding_info = get_embedding_info(embedding_model_endpoint) embedding_function = sm_utils.getCustomEmbeddings( embedding_model_endpoint, region, embedding_info.get("ModelType")