feat: optimize web reader summary in 3.5 (#933)
This commit is contained in:
parent
4ff1870a4b
commit
4c49ecedb5
1 changed files with 2 additions and 0 deletions
|
|
@ -88,6 +88,8 @@ 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]
|
||||||
|
|
||||||
|
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]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue