cohere-compass-sdk 2.2.2__tar.gz → 2.3.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cohere_compass_sdk-2.2.2 → cohere_compass_sdk-2.3.2}/PKG-INFO +1 -1
- {cohere_compass_sdk-2.2.2 → cohere_compass_sdk-2.3.2}/cohere_compass/clients/compass.py +12 -1
- {cohere_compass_sdk-2.2.2 → cohere_compass_sdk-2.3.2}/cohere_compass/clients/compass_async.py +12 -1
- {cohere_compass_sdk-2.2.2 → cohere_compass_sdk-2.3.2}/cohere_compass/models/documents.py +2 -0
- {cohere_compass_sdk-2.2.2 → cohere_compass_sdk-2.3.2}/pyproject.toml +1 -1
- {cohere_compass_sdk-2.2.2 → cohere_compass_sdk-2.3.2}/LICENSE +0 -0
- {cohere_compass_sdk-2.2.2 → cohere_compass_sdk-2.3.2}/README.md +0 -0
- {cohere_compass_sdk-2.2.2 → cohere_compass_sdk-2.3.2}/cohere_compass/__init__.py +0 -0
- {cohere_compass_sdk-2.2.2 → cohere_compass_sdk-2.3.2}/cohere_compass/clients/__init__.py +0 -0
- {cohere_compass_sdk-2.2.2 → cohere_compass_sdk-2.3.2}/cohere_compass/clients/access_control.py +0 -0
- {cohere_compass_sdk-2.2.2 → cohere_compass_sdk-2.3.2}/cohere_compass/clients/parser.py +0 -0
- {cohere_compass_sdk-2.2.2 → cohere_compass_sdk-2.3.2}/cohere_compass/clients/parser_async.py +0 -0
- {cohere_compass_sdk-2.2.2 → cohere_compass_sdk-2.3.2}/cohere_compass/constants.py +0 -0
- {cohere_compass_sdk-2.2.2 → cohere_compass_sdk-2.3.2}/cohere_compass/exceptions.py +0 -0
- {cohere_compass_sdk-2.2.2 → cohere_compass_sdk-2.3.2}/cohere_compass/models/__init__.py +0 -0
- {cohere_compass_sdk-2.2.2 → cohere_compass_sdk-2.3.2}/cohere_compass/models/access_control.py +0 -0
- {cohere_compass_sdk-2.2.2 → cohere_compass_sdk-2.3.2}/cohere_compass/models/config.py +0 -0
- {cohere_compass_sdk-2.2.2 → cohere_compass_sdk-2.3.2}/cohere_compass/models/datasources.py +0 -0
- {cohere_compass_sdk-2.2.2 → cohere_compass_sdk-2.3.2}/cohere_compass/models/indexes.py +0 -0
- {cohere_compass_sdk-2.2.2 → cohere_compass_sdk-2.3.2}/cohere_compass/models/search.py +0 -0
- {cohere_compass_sdk-2.2.2 → cohere_compass_sdk-2.3.2}/cohere_compass/py.typed +0 -0
- {cohere_compass_sdk-2.2.2 → cohere_compass_sdk-2.3.2}/cohere_compass/utils/asyn.py +0 -0
- {cohere_compass_sdk-2.2.2 → cohere_compass_sdk-2.3.2}/cohere_compass/utils/documents.py +0 -0
- {cohere_compass_sdk-2.2.2 → cohere_compass_sdk-2.3.2}/cohere_compass/utils/fs.py +0 -0
- {cohere_compass_sdk-2.2.2 → cohere_compass_sdk-2.3.2}/cohere_compass/utils/iter.py +0 -0
- {cohere_compass_sdk-2.2.2 → cohere_compass_sdk-2.3.2}/cohere_compass/utils/retry.py +0 -0
|
@@ -635,6 +635,8 @@ class CompassClient:
|
|
|
635
635
|
attributes: DocumentAttributes = DocumentAttributes(),
|
|
636
636
|
config: ParseableDocumentConfig = ParseableDocumentConfig(),
|
|
637
637
|
content_type: ContentTypeEnum | None = None,
|
|
638
|
+
authorized_groups: list[str] | None = None,
|
|
639
|
+
merge_groups_on_conflict: bool = False,
|
|
638
640
|
max_retries: int | None = None,
|
|
639
641
|
retry_wait: timedelta | None = None,
|
|
640
642
|
timeout: timedelta | None = None,
|
|
@@ -650,6 +652,11 @@ class CompassClient:
|
|
|
650
652
|
:param document_id: The ID to assign to the document.
|
|
651
653
|
:param attributes: Additional attributes to add to the document.
|
|
652
654
|
:param config: Configuration for the document parsing.
|
|
655
|
+
:param authorized_groups: When Document-level Security is enabled,
|
|
656
|
+
Set authorized user groups to access the document.
|
|
657
|
+
These groups should exist in RBAC. Default will make the document public.
|
|
658
|
+
:param merge_groups_on_conflict: When Document-level Security is enabled,
|
|
659
|
+
allows merging authorized groups if document already exists.
|
|
653
660
|
:param max_retries: Maximum number of retries for failed requests. If not
|
|
654
661
|
provided, the default from the client will be used.
|
|
655
662
|
:param retry_wait: Time to wait between retries. If not provided, the default
|
|
@@ -674,7 +681,11 @@ class CompassClient:
|
|
|
674
681
|
|
|
675
682
|
result = self._send_request(
|
|
676
683
|
api_name="upload_documents",
|
|
677
|
-
data=UploadDocumentsInput(
|
|
684
|
+
data=UploadDocumentsInput(
|
|
685
|
+
documents=[doc],
|
|
686
|
+
authorized_groups=authorized_groups,
|
|
687
|
+
merge_groups_on_conflict=merge_groups_on_conflict,
|
|
688
|
+
),
|
|
678
689
|
index_name=index_name,
|
|
679
690
|
max_retries=max_retries,
|
|
680
691
|
retry_wait=retry_wait,
|
{cohere_compass_sdk-2.2.2 → cohere_compass_sdk-2.3.2}/cohere_compass/clients/compass_async.py
RENAMED
|
@@ -494,6 +494,8 @@ class CompassAsyncClient:
|
|
|
494
494
|
attributes: DocumentAttributes = DocumentAttributes(),
|
|
495
495
|
config: ParseableDocumentConfig = ParseableDocumentConfig(),
|
|
496
496
|
content_type: ContentTypeEnum | None = None,
|
|
497
|
+
authorized_groups: list[str] | None = None,
|
|
498
|
+
merge_groups_on_conflict: bool = False,
|
|
497
499
|
max_retries: int | None = None,
|
|
498
500
|
retry_wait: timedelta | None = None,
|
|
499
501
|
timeout: timedelta | None = None,
|
|
@@ -509,6 +511,11 @@ class CompassAsyncClient:
|
|
|
509
511
|
:param document_id: the id of the document (optional)
|
|
510
512
|
:param attributes: Additional attributes to add to the document.
|
|
511
513
|
:param config: Configuration for the document parsing.
|
|
514
|
+
:param authorized_groups: The groups that are authorized to access the
|
|
515
|
+
document. These groups should exist in RBAC. None passed will make the
|
|
516
|
+
document public.
|
|
517
|
+
:param merge_groups_on_conflict: Allows combining authorized group field
|
|
518
|
+
when document already exists, and Document Level Security is enabled.
|
|
512
519
|
:param max_retries: Maximum number of retries for failed requests. If not
|
|
513
520
|
provided, the default from the client will be used.
|
|
514
521
|
:param retry_wait: Time to wait between retries. If not provided, the default
|
|
@@ -533,7 +540,11 @@ class CompassAsyncClient:
|
|
|
533
540
|
|
|
534
541
|
result = await self._send_request(
|
|
535
542
|
api_name="upload_documents",
|
|
536
|
-
data=UploadDocumentsInput(
|
|
543
|
+
data=UploadDocumentsInput(
|
|
544
|
+
documents=[doc],
|
|
545
|
+
authorized_groups=authorized_groups,
|
|
546
|
+
merge_groups_on_conflict=merge_groups_on_conflict,
|
|
547
|
+
),
|
|
537
548
|
index_name=index_name,
|
|
538
549
|
max_retries=max_retries,
|
|
539
550
|
retry_wait=retry_wait,
|
|
@@ -311,6 +311,8 @@ class UploadDocumentsInput(BaseModel):
|
|
|
311
311
|
"""A model for the input of a call to upload_documents API."""
|
|
312
312
|
|
|
313
313
|
documents: list[ParseableDocument]
|
|
314
|
+
authorized_groups: list[str] | None = None
|
|
315
|
+
merge_groups_on_conflict: bool = False
|
|
314
316
|
|
|
315
317
|
|
|
316
318
|
class UploadDocumentsResult(BaseModel):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cohere_compass_sdk-2.2.2 → cohere_compass_sdk-2.3.2}/cohere_compass/clients/access_control.py
RENAMED
|
File without changes
|
|
File without changes
|
{cohere_compass_sdk-2.2.2 → cohere_compass_sdk-2.3.2}/cohere_compass/clients/parser_async.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cohere_compass_sdk-2.2.2 → cohere_compass_sdk-2.3.2}/cohere_compass/models/access_control.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|