Skip to content

Commit

Permalink
fix: handle KeyError when accessing rules in CleanProcessor.clean (la…
Browse files Browse the repository at this point in the history
  • Loading branch information
pinsily authored and jiangzhijie committed Nov 14, 2024
1 parent 7350bf1 commit 06567d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/core/indexing_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 06567d1

Please sign in to comment.