Skip to content

The agent engineering platform.

community[patch]: GCSDirectoryLoader bugfix (#20005)

Timothy0c848a25adf2
diff --git a/libs/community/langchain_community/document_loaders/gcs_directory.py b/libs/community/langchain_community/document_loaders/gcs_directory.py
index 3bb0cd0738..570afd0a1c 100644
--- a/libs/community/langchain_community/document_loaders/gcs_directory.py
+++ b/libs/community/langchain_community/document_loaders/gcs_directory.py
@@ -65,10 +65,6 @@ class GCSDirectoryLoader(BaseLoader):
# intermediate directories on the fly
if blob.name.endswith("/"):
continue
- loader = GCSFileLoader(
- self.project_name, self.bucket, blob.name, loader_func=self._loader_func
- )
- docs.extend(loader.load())
# Use the try-except block here
try:
loader = GCSFileLoader(