Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: remove empty segment in splitter (#68)

John Wang0587ff0fba3a
diff --git a/api/core/indexing_runner.py b/api/core/indexing_runner.py
index f06f3a00341..a4ff9ed2874 100644
--- a/api/core/indexing_runner.py
+++ b/api/core/indexing_runner.py
@@ -343,7 +343,7 @@ class IndexingRunner:
# parse document to nodes
nodes = node_parser.get_nodes_from_documents([text_doc])
-
+ nodes = [node for node in nodes if node.text is not None and node.text.strip()]
all_nodes.extend(nodes)
return all_nodes