mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-14 05:55:52 +08:00
feat: optimize web reader summary in 3.5 (#933)
This commit is contained in:
parent
4ff1870a4b
commit
4c49ecedb5
@ -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…
x
Reference in New Issue
Block a user