fix(model): Stream object can't use await (#1719)

Co-authored-by: kain <kai4tech@gmail.com>
This commit is contained in:
Kain Shu 2024-07-16 17:38:38 +08:00 committed by GitHub
parent e4abd56eeb
commit 45c9938f6e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -40,7 +40,7 @@ class URLKnowledge(Knowledge):
from langchain.document_loaders import WebBaseLoader # mypy: ignore
if self._path is not None:
web_reader = WebBaseLoader(web_path=self._path)
web_reader = WebBaseLoader(web_path=self._path, encoding="utf8")
documents = web_reader.load()
else:
# Handle the case where self._path is None