Skip to content

Commit

Permalink
add child chunk preview number limit
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnJyong committed Jan 2, 2025
1 parent 43d2e84 commit 229d68d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def transform(self, documents: list[Document], **kwargs) -> list[Document]:
)
if kwargs.get("preview"):
if len(child_nodes) > dify_config.CHILD_CHUNKS_PREVIEW_NUMBER:
child_nodes = child_nodes[:dify_config.CHILD_CHUNKS_PREVIEW_NUMBER]
child_nodes = child_nodes[: dify_config.CHILD_CHUNKS_PREVIEW_NUMBER]

document.children = child_nodes
doc_id = str(uuid.uuid4())
Expand Down

0 comments on commit 229d68d

Please sign in to comment.