refactor: Update URLComponent to include text_key in Data objects
This commit is contained in:
parent
fa68a8fee6
commit
65e888b7a8
1 changed files with 1 additions and 1 deletions
|
|
@ -62,6 +62,6 @@ class URLComponent(Component):
|
|||
urls = [self.ensure_url(url.strip()) for url in self.urls if url.strip()]
|
||||
loader = WebBaseLoader(web_paths=urls, encoding="utf-8")
|
||||
docs = loader.load()
|
||||
data = [Data(content=doc.page_content, **doc.metadata) for doc in docs]
|
||||
data = [Data(text_key="content", content=doc.page_content, **doc.metadata) for doc in docs]
|
||||
self.status = data
|
||||
return data
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue