From 5e4de107c4f094cab43bf0df2c9fdffe1df63c02 Mon Sep 17 00:00:00 2001 From: pinsily <13160724868@163.com> Date: Mon, 4 Nov 2024 19:46:57 +0800 Subject: [PATCH] fix: KeyError: 'rules' --- api/core/indexing_runner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/core/indexing_runner.py b/api/core/indexing_runner.py index fb9fe8f210d119..e2a94073cf4c14 100644 --- a/api/core/indexing_runner.py +++ b/api/core/indexing_runner.py @@ -598,7 +598,7 @@ def _document_clean(text: str, processing_rule: DatasetProcessRule) -> str: rules = DatasetProcessRule.AUTOMATIC_RULES else: rules = json.loads(processing_rule.rules) if processing_rule.rules else {} - document_text = CleanProcessor.clean(text, rules) + document_text = CleanProcessor.clean(text, {"rules": rules}) return document_text