diff --git a/src/backend/base/langflow/components/data/URL.py b/src/backend/base/langflow/components/data/URL.py index 0860160c8..0b10a9820 100644 --- a/src/backend/base/langflow/components/data/URL.py +++ b/src/backend/base/langflow/components/data/URL.py @@ -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(text_key="content", content=doc.page_content, **doc.metadata) for doc in docs] + data = [Data(text_key="text", content=doc.page_content, **doc.metadata) for doc in docs] self.status = data return data diff --git a/src/backend/base/langflow/components/experimental/SplitText.py b/src/backend/base/langflow/components/experimental/SplitText.py index a3a853baf..211c26338 100644 --- a/src/backend/base/langflow/components/experimental/SplitText.py +++ b/src/backend/base/langflow/components/experimental/SplitText.py @@ -73,15 +73,15 @@ class SplitTextComponent(Component): for chunk in chunks: buffer += chunk while len(buffer) >= max_chunk_size: - results.append(Data(data={"parent": text, "chunk": buffer[:max_chunk_size]})) + results.append(Data(data={"parent": text, "text": buffer[:max_chunk_size]})) buffer = buffer[max_chunk_size:] if len(buffer) >= min_chunk_size: - results.append(Data(data={"parent": text, "chunk": buffer})) + results.append(Data(data={"parent": text, "text": buffer})) buffer = "" # Handle any remaining text that may not meet the min_chunk_size requirement if buffer: - results.append(Data(data={"parent": text, "chunk": buffer})) + results.append(Data(data={"parent": text, "text": buffer})) self.status = results return results