mirror of
https://github.com/langgenius/dify.git
synced 2026-05-03 00:48:04 +08:00
improve preview document tokenizer (#13328)
This commit is contained in:
@ -47,6 +47,8 @@ class ParentChildIndexProcessor(BaseIndexProcessor):
|
||||
embedding_model_instance=kwargs.get("embedding_model_instance"),
|
||||
)
|
||||
for document in documents:
|
||||
if kwargs.get("preview") and len(all_documents) >= 10:
|
||||
return all_documents
|
||||
# document clean
|
||||
document_text = CleanProcessor.clean(document.page_content, process_rule)
|
||||
document.page_content = document_text
|
||||
|
||||
Reference in New Issue
Block a user