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

Docs: Update safe mode description #228

Merged
merged 2 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions deepset_cloud_sdk/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def upload( # pylint: disable=too-many-arguments
"""Upload a folder to deepset Cloud.

:param paths: Path to the folder to upload. If the folder contains unsupported file types, they're skipped.
deepset Cloud supports csv, docx, html, json, md, txt, pdf, pptx, xlsx, xml.
deepset Cloud supports CSV, DOCX, HTML, JSON, MD, TXT, PDF, PPTX, XLSX, XML.
:param api_key: deepset Cloud API key to use for authentication.
:param api_url: API URL to use for authentication.
:param workspace_name: Name of the workspace to upload the files to. It uses the workspace from the .ENV file by default.
Expand All @@ -57,10 +57,10 @@ def upload( # pylint: disable=too-many-arguments
:param timeout_s: Timeout in seconds for the `blocking` parameter.
:param show_progress: Shows the upload progress.
:param recursive: Uploads files from subfolders as well.
:param use_type: A comma-separated string of allowed file types to upload, defaults to ".txt, .pdf".
:param enable_parallel_processing: If `True`, the deepset Cloud will ingest the files in parallel.
Use this to speed up the upload process and if you are not running concurrent uploads for the same files.
:param safe_mode: If `True`, the deepset Cloud will not ingest the files in parallel.
:param use_type: A comma-separated string of allowed file types to upload.
:param enable_parallel_processing: If `True`, deepset Cloud ingests the files in parallel.
Use this to speed up the upload process. Make sure you are not running concurrent uploads for the same files.
:param safe_mode: If `True`, disables ingesting files in parallel.
"""
use_type = use_type or [".txt", ".pdf"]
sync_upload(
Expand Down Expand Up @@ -103,7 +103,7 @@ def download( # pylint: disable=too-many-arguments
:param api_key: API key to use for authentication.
:param api_url: API URL to use for authentication.
:param show_progress: Shows the upload progress.
:param safe_mode: If `True`, the deepset Cloud will not ingest the files in parallel.
:param safe_mode: If `True`, disables ingesting files in parallel.
"""
sync_download(
workspace_name=workspace_name,
Expand Down
10 changes: 5 additions & 5 deletions deepset_cloud_sdk/workflows/async_client/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ async def download(
:param api_url: API URL to use for authentication.
:param show_progress: Shows the upload progress.
:param timeout_s: Timeout in seconds for the download.
:param safe_mode: If `True`, the deepset Cloud will not ingest the files in parallel.
:param safe_mode: If `True`, disabled ingesting files in parallel.
"""
async with FilesService.factory(_get_config(api_key=api_key, api_url=api_url, safe_mode=safe_mode)) as file_service:
await file_service.download(
Expand Down Expand Up @@ -236,8 +236,8 @@ async def upload_texts(
This may take a couple of minutes.
:param timeout_s: Timeout in seconds for the `blocking` parameter.
:param show_progress: Shows the upload progress.
:param enable_parallel_processing: If `True`, the deepset Cloud will ingest the files in parallel.
Use this to speed up the upload process and if you are not running concurrent uploads for the same files.
:param enable_parallel_processing: If `True`, deepset Cloud ingests files in parallel.
Use this to speed up the upload process. Make sure you are not running concurrent uploads for the same files.

Example:
```python
Expand Down Expand Up @@ -302,8 +302,8 @@ async def upload_bytes(
This may take a couple of minutes.
:param timeout_s: Timeout in seconds for the `blocking` parameter.
:param show_progress: Shows the upload progress.
:param enable_parallel_processing: If `True`, the deepset Cloud will ingest the files in parallel.
Use this to speed up the upload process and if you are not running concurrent uploads for the same files.
:param enable_parallel_processing: If `True`, deepset Cloud ingests files in parallel.
Use this to speed up the upload process. Make sure you are not running concurrent uploads for the same files.
"""
async with FilesService.factory(_get_config(api_key=api_key, api_url=api_url)) as file_service:
return await file_service.upload_in_memory(
Expand Down
16 changes: 8 additions & 8 deletions deepset_cloud_sdk/workflows/sync_client/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ def upload( # pylint: disable=too-many-arguments
:param recursive: Uploads files from subfolders as well.
:param desired_file_types: A list of allowed file types to upload, defaults to
`[".txt", ".pdf", ".docx", ".pptx", ".xlsx", ".xml", ".csv", ".html", ".md", ".json"]`
:param enable_parallel_processing: If `True`, the deepset Cloud will ingest the files in parallel.
Use this to speed up the upload process and if you are not running concurrent uploads for the same files.
:param safe_mode: If `True`, the deepset Cloud will not ingest the files in parallel.
:param enable_parallel_processing: If `True`, deepset Cloud ingests files in parallel.
Use this to speed up the upload process. Make sure you are not running concurrent uploads for the same files.
:param safe_mode: If `True`, disables ingesting files in parallel.
"""
desired_file_types = desired_file_types or SUPPORTED_TYPE_SUFFIXES
return asyncio.run(
Expand Down Expand Up @@ -121,7 +121,7 @@ def download( # pylint: disable=too-many-arguments
:param api_url: API URL to use for authentication.
:param show_progress: Shows the upload progress.
:param timeout_s: Timeout in seconds for the API requests.
:param safe_mode: If `True`, the deepset Cloud will not ingest the files in parallel.
:param safe_mode: If `True`, disables ingesting files in parallel.
"""
asyncio.run(
async_download(
Expand Down Expand Up @@ -165,8 +165,8 @@ def upload_texts(
:param blocking: Whether to wait for the files to be uploaded and listed in deepset Cloud.
:param timeout_s: Timeout in seconds for the `blocking` parameter.
:param show_progress: Shows the upload progress.
:param enable_parallel_processing: If `True`, the deepset Cloud will ingest the files in parallel.
Use this to speed up the upload process and if you are not running concurrent uploads for the same files.
:param enable_parallel_processing: If `True`, deepset Cloud ingests files in parallel.
Use this to speed up the upload process. Make sure you are not running concurrent uploads for the same files.

Example:
```python
Expand Down Expand Up @@ -227,8 +227,8 @@ def upload_bytes(
:param blocking: Whether to wait for the files to be uploaded and listed in deepset Cloud.
:param timeout_s: Timeout in seconds for the `blocking` parameter.
:param show_progress: Shows the upload progress.
:param enable_parallel_processing: If `True`, the deepset Cloud will ingest the files in parallel.
Use this to speed up the upload process and if you are not running concurrent uploads for the same files.
:param enable_parallel_processing: If `True`, deepset Cloud ingests files in parallel.
Use this to speed up the upload process. Make sure you are not running concurrent uploads for the same files.
"""
return asyncio.run(
async_upload_bytes(
Expand Down
Loading