Unverified Commit 5cba2e70 authored by takatost's avatar takatost Committed by GitHub

fix: web reader tool retrieve content empty (#957)

parent 5623839c
...@@ -88,6 +88,9 @@ class WebReaderTool(BaseTool): ...@@ -88,6 +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:
return "No content found."
docs = docs[1:] docs = docs[1:]
# only use first 5 docs # only use first 5 docs
......
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