Pārlūkot izejas kodu

fix: web reader tool retrieve content empty (#957)

tags/0.3.15
takatost pirms 2 gadiem
vecāks
revīzija
5cba2e7087
Revīzijas autora e-pasta adrese nav piesaistīta nevienam kontam
1 mainītis faili ar 3 papildinājumiem un 0 dzēšanām
  1. 3
    0
      api/core/tool/web_reader_tool.py

+ 3
- 0
api/core/tool/web_reader_tool.py Parādīt failu

@@ -88,6 +88,9 @@ class WebReaderTool(BaseTool):
texts = character_splitter.split_text(page_contents)
docs = [Document(page_content=t) for t in texts]

if len(docs) == 0:
return "No content found."

docs = docs[1:]

# only use first 5 docs

Notiek ielāde…
Atcelt
Saglabāt