From e053215155112ca24181012fc824323fdb6580ca Mon Sep 17 00:00:00 2001 From: Jyong <76649700+JohnJyong@users.noreply.github.com> Date: Fri, 25 Aug 2023 20:10:08 +0800 Subject: [PATCH] fix document estimate parameter (#1019) Co-authored-by: jyong --- api/controllers/console/datasets/datasets_document.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/api/controllers/console/datasets/datasets_document.py b/api/controllers/console/datasets/datasets_document.py index 717edf07a6..b2a1d3a681 100644 --- a/api/controllers/console/datasets/datasets_document.py +++ b/api/controllers/console/datasets/datasets_document.py @@ -416,7 +416,8 @@ class DocumentIndexingEstimateApi(DocumentResource): try: response = indexing_runner.file_indexing_estimate(current_user.current_tenant_id, [file], - data_process_rule_dict, None, dataset_id) + data_process_rule_dict, None, + 'English', dataset_id) except LLMBadRequestError: raise ProviderNotInitializeError( f"No Embedding Model available. Please configure a valid provider " @@ -485,7 +486,8 @@ class DocumentBatchIndexingEstimateApi(DocumentResource): indexing_runner = IndexingRunner() try: response = indexing_runner.file_indexing_estimate(current_user.current_tenant_id, file_details, - data_process_rule_dict, None, dataset_id) + data_process_rule_dict, None, + 'English', dataset_id) except LLMBadRequestError: raise ProviderNotInitializeError( f"No Embedding Model available. Please configure a valid provider " @@ -499,7 +501,7 @@ class DocumentBatchIndexingEstimateApi(DocumentResource): response = indexing_runner.notion_indexing_estimate(current_user.current_tenant_id, info_list, data_process_rule_dict, - None, dataset_id) + None, 'English', dataset_id) except LLMBadRequestError: raise ProviderNotInitializeError( f"No Embedding Model available. Please configure a valid provider "