This website works better with JavaScript.
Home
Explore
Help
Register
Sign In
OpenSource
/
dify
Watch
4
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
152
Wiki
Activity
Browse Source
feat: optimize web reader summary in 3.5 (
#933
)
tags/0.3.15
takatost
2 years ago
parent
4ff1870a4b
commit
4c49ecedb5
No account linked to committer's email address
1 changed files
with
2 additions
and
0 deletions
Split View
Show Diff Stats
2
0
api/core/tool/web_reader_tool.py
+ 2
- 0
api/core/tool/web_reader_tool.py
View File
@@ -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]
Write
Preview
Loading…
Cancel
Save