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: summary no docs (#1073)

takatost78e26f8b75e9
diff --git a/api/core/tool/web_reader_tool.py b/api/core/tool/web_reader_tool.py
index be76839239f..c2e68bc7a83 100644
--- a/api/core/tool/web_reader_tool.py
+++ b/api/core/tool/web_reader_tool.py
@@ -88,11 +88,9 @@ class WebReaderTool(BaseTool):
texts = character_splitter.split_text(page_contents)
docs = [Document(page_content=t) for t in texts]
- if len(docs) == 0:
+ if len(docs) == 0 or docs[0].page_content.endswith('TEXT:'):
return "No content found."
- docs = docs[1:]
-
# only use first 5 docs
if len(docs) > 5:
docs = docs[:5]