Unverified Commit 78e26f8b authored by takatost's avatar takatost Committed by GitHub

fix: summary no docs (#1073)

parent 2191312b
...@@ -88,11 +88,9 @@ class WebReaderTool(BaseTool): ...@@ -88,11 +88,9 @@ class WebReaderTool(BaseTool):
texts = character_splitter.split_text(page_contents) texts = character_splitter.split_text(page_contents)
docs = [Document(page_content=t) for t in texts] 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." return "No content found."
docs = docs[1:]
# only use first 5 docs # only use first 5 docs
if len(docs) > 5: if len(docs) > 5:
docs = docs[:5] docs = docs[:5]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment