Browse Source

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

takatost 1 năm trước cách đây
mục cha
commit
4c49ecedb5
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      api/core/tool/web_reader_tool.py

+ 2 - 0
api/core/tool/web_reader_tool.py

@@ -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]