Add Document type to ReadTheDocsLoaderComponent

This commit is contained in:
anovazzi1 2024-01-10 16:45:31 -03:00
commit 24931545f9

View file

@ -1,5 +1,6 @@
from langflow import CustomComponent
from typing import Dict, Optional
from typing import Dict, Optional,List
from langchain_core.documents import Document
from langchain_community.document_loaders.readthedocs import ReadTheDocsLoader
@ -17,5 +18,5 @@ class ReadTheDocsLoaderComponent(CustomComponent):
self,
path: str,
metadata: Optional[Dict] = None,
) -> ReadTheDocsLoader:
) -> List[Document]:
return ReadTheDocsLoader(path=path, metadata=metadata or {}).load()