refactor: Update fetch_content return type to list[Data]
This commit is contained in:
parent
bcafa2e5eb
commit
ae12c7a2d0
1 changed files with 1 additions and 1 deletions
|
|
@ -56,7 +56,7 @@ class URLComponent(Component):
|
||||||
|
|
||||||
return string
|
return string
|
||||||
|
|
||||||
def fetch_content(self) -> Data:
|
def fetch_content(self) -> list[Data]:
|
||||||
urls = [self.ensure_url(url.strip()) for url in self.urls if url.strip()]
|
urls = [self.ensure_url(url.strip()) for url in self.urls if url.strip()]
|
||||||
loader = WebBaseLoader(web_paths=urls, encoding="utf-8")
|
loader = WebBaseLoader(web_paths=urls, encoding="utf-8")
|
||||||
docs = loader.load()
|
docs = loader.load()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue