Unverified Commit 4c49eced authored by takatost's avatar takatost Committed by GitHub

feat: optimize web reader summary in 3.5 (#933)

parent 4ff1870a
......@@ -88,6 +88,8 @@ class WebReaderTool(BaseTool):
texts = character_splitter.split_text(page_contents)
docs = [Document(page_content=t) for t in texts]
docs = docs[1:]
# only use first 5 docs
if len(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