The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
add mode arg to OBSFileLoader.load() method (#29246)
Junon667d2a57fd0b
diff --git a/libs/community/langchain_community/document_loaders/obs_file.py b/libs/community/langchain_community/document_loaders/obs_file.pyindex d6add62c33..f96ad3cd7e 100644--- a/libs/community/langchain_community/document_loaders/obs_file.py+++ b/libs/community/langchain_community/document_loaders/obs_file.py@@ -92,7 +92,7 @@ class OBSFileLoader(BaseLoader):self.bucket = bucketself.key = key- def load(self) -> List[Document]:+ def load(self, mode: str = "single") -> List[Document]:"""Load documents."""with tempfile.TemporaryDirectory() as temp_dir:file_path = f"{temp_dir}/{self.bucket}/{self.key}"@@ -101,5 +101,5 @@ class OBSFileLoader(BaseLoader):self.client.downloadFile(bucketName=self.bucket, objectKey=self.key, downloadFile=file_path)- loader = UnstructuredFileLoader(file_path)+ loader = UnstructuredFileLoader(file_path, mode=mode)return loader.load()