Skip to content

The agent engineering platform.

community[patch]: refactor the type hint of `file_path` in `UnstructuredAPIFileLoader` class (#18839)

Hyeongchan Kim9b70131aed02
diff --git a/libs/community/langchain_community/document_loaders/unstructured.py b/libs/community/langchain_community/document_loaders/unstructured.py
index 22df465589..bc056ca702 100644
--- a/libs/community/langchain_community/document_loaders/unstructured.py
+++ b/libs/community/langchain_community/document_loaders/unstructured.py
@@ -156,7 +156,7 @@ class UnstructuredFileLoader(UnstructuredBaseLoader):
def __init__(
self,
- file_path: Union[str, List[str], Path, List[Path]],
+ file_path: Union[str, List[str], Path, List[Path], None],
mode: str = "single",
**unstructured_kwargs: Any,
):
@@ -255,7 +255,7 @@ class UnstructuredAPIFileLoader(UnstructuredFileLoader):
def __init__(
self,
- file_path: Union[str, List[str]] = "",
+ file_path: Union[str, List[str], None] = "",
mode: str = "single",
url: str = "https://api.unstructured.io/general/v0/general",
api_key: str = "",