Add Document type to ReadTheDocsLoaderComponent
This commit is contained in:
parent
f086f31e79
commit
24931545f9
1 changed files with 3 additions and 2 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue