Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

community[minor]: S3FileLoader to use expose mode and post_processors arguments of unstructured loader #19270

Merged
merged 7 commits into from
Mar 25, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
aws_secret_access_key: Optional[str] = None,
aws_session_token: Optional[str] = None,
boto_config: Optional[botocore.client.Config] = None,
mode: str = "single",
post_processors: Optional[List[Callable]] = None

Check failure on line 31 in libs/community/langchain_community/document_loaders/s3_file.py

View workflow job for this annotation

GitHub Actions / cd libs/community / make lint #3.8

Ruff (F821)

langchain_community/document_loaders/s3_file.py:31:40: F821 Undefined name `Callable`

Check failure on line 31 in libs/community/langchain_community/document_loaders/s3_file.py

View workflow job for this annotation

GitHub Actions / cd libs/community / make lint #3.11

Ruff (F821)

langchain_community/document_loaders/s3_file.py:31:40: F821 Undefined name `Callable`
):
"""Initialize with bucket and key name.

Expand Down Expand Up @@ -82,8 +84,10 @@
object is set on the session, the config object used when creating
the client will be the result of calling ``merge()`` on the
default config with the config provided to this call.
:param mode: Mode in which to read the file. Valid options are: single, paged and elements

Check failure on line 87 in libs/community/langchain_community/document_loaders/s3_file.py

View workflow job for this annotation

GitHub Actions / cd libs/community / make lint #3.8

Ruff (E501)

langchain_community/document_loaders/s3_file.py:87:89: E501 Line too long (98 > 88)

Check failure on line 87 in libs/community/langchain_community/document_loaders/s3_file.py

View workflow job for this annotation

GitHub Actions / cd libs/community / make lint #3.11

Ruff (E501)

langchain_community/document_loaders/s3_file.py:87:89: E501 Line too long (98 > 88)
:param post_processors: Post processing functions to be applied to extracted elements

Check failure on line 88 in libs/community/langchain_community/document_loaders/s3_file.py

View workflow job for this annotation

GitHub Actions / cd libs/community / make lint #3.8

Ruff (E501)

langchain_community/document_loaders/s3_file.py:88:89: E501 Line too long (93 > 88)

Check failure on line 88 in libs/community/langchain_community/document_loaders/s3_file.py

View workflow job for this annotation

GitHub Actions / cd libs/community / make lint #3.11

Ruff (E501)

langchain_community/document_loaders/s3_file.py:88:89: E501 Line too long (93 > 88)
"""
super().__init__()
super().__init__(mode, post_processors)
self.bucket = bucket
self.key = key
self.region_name = region_name
Expand Down