mixpeek 0.20.20__py3-none-any.whl → 0.21.1__py3-none-any.whl
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.
- mixpeek/_version.py +3 -3
- mixpeek/{assets.py → bucket_objects.py} +309 -793
- mixpeek/buckets.py +1292 -0
- mixpeek/clusters.py +306 -0
- mixpeek/collection_cache.py +820 -0
- mixpeek/{taxonomyentities.py → collection_documents.py} +305 -559
- mixpeek/collections.py +122 -996
- mixpeek/features.py +45 -991
- mixpeek/models/__init__.py +625 -570
- mixpeek/models/aggregationtype.py +13 -0
- mixpeek/models/apikeyupdate.py +1 -1
- mixpeek/models/attributebasedconfig.py +21 -0
- mixpeek/models/automaticnaming.py +29 -0
- mixpeek/models/basicfeatureextractor.py +35 -0
- mixpeek/models/{classify_features_v1_entities_taxonomies_taxonomy_classify_postop.py → batch_delete_documents_v1_collections_collection_identifier_documents_batch_deleteop.py} +17 -15
- mixpeek/models/{update_collection_v1_collections_collection_putop.py → batch_update_documents_v1_collections_collection_identifier_documents_batch_putop.py} +29 -19
- mixpeek/models/blobdetails.py +72 -0
- mixpeek/models/blobmodel.py +107 -0
- mixpeek/models/bucketcreaterequest.py +75 -0
- mixpeek/models/bucketresponse.py +90 -0
- mixpeek/models/bucketschema_input.py +37 -0
- mixpeek/models/bucketschema_output.py +37 -0
- mixpeek/models/{featureresponse.py → bucketschemafield_input.py} +45 -18
- mixpeek/models/bucketschemafield_output.py +101 -0
- mixpeek/models/bucketschemafieldtype.py +29 -0
- mixpeek/models/bucketupdaterequest.py +68 -0
- mixpeek/models/cachestats.py +40 -0
- mixpeek/models/{list_collections_v1_collections_getop.py → cleanup_cache_v1_collections_cache_cleanup_postop.py} +23 -12
- mixpeek/models/{inputtype.py → clusteringmethod.py} +3 -5
- mixpeek/models/clustertype.py +9 -0
- mixpeek/models/collectioncacheconfig_input.py +92 -0
- mixpeek/models/collectioncacheconfig_output.py +92 -0
- mixpeek/models/collectionconfig.py +32 -0
- mixpeek/models/collectionmodel.py +79 -8
- mixpeek/models/{create_taxonomy_v1_entities_taxonomies_postop.py → create_bucket_v1_buckets_create_postop.py} +7 -7
- mixpeek/models/{search_assets_v1_assets_search_postop.py → create_cluster_v1_clusters_postop.py} +7 -7
- mixpeek/models/{create_collection_v1_collections_postop.py → create_collection_v1_collections_create_postop.py} +3 -3
- mixpeek/models/{ingest_video_url_v1_ingest_videos_url_postop.py → create_interaction_v1_retrievers_interactions_postop.py} +7 -7
- mixpeek/models/{partial_asset_update_v1_assets_asset_id_patchop.py → create_object_v1_buckets_bucket_identifier_objects_create_postop.py} +11 -9
- mixpeek/models/{ingest_text_v1_ingest_text_postop.py → create_retriever_v1_retrievers_retrievers_postop.py} +10 -7
- mixpeek/models/{ingest_image_url_v1_ingest_images_url_postop.py → create_taxonomy_v1_taxonomies_postop.py} +7 -7
- mixpeek/models/createblobrequest.py +80 -0
- mixpeek/models/createclusterrequest.py +74 -0
- mixpeek/models/createcollectionrequest.py +72 -3
- mixpeek/models/createnamespacerequest.py +14 -8
- mixpeek/models/createobjectrequest.py +75 -0
- mixpeek/models/createretrieverrequest.py +90 -0
- mixpeek/models/{taxonomyupdate.py → createtaxonomyrequest.py} +15 -13
- mixpeek/models/{delete_asset_v1_assets_asset_id_deleteop.py → delete_bucket_v1_buckets_bucket_identifier_deleteop.py} +5 -5
- mixpeek/models/{delete_classifications_v1_entities_taxonomies_taxonomy_classifications_classification_id_deleteop.py → delete_document_v1_collections_collection_identifier_documents_document_id_deleteop.py} +11 -11
- mixpeek/models/{get_taxonomy_v1_entities_taxonomies_taxonomy_getop.py → delete_interaction_v1_retrievers_interactions_interaction_id_deleteop.py} +7 -7
- mixpeek/models/delete_object_v1_buckets_bucket_identifier_objects_object_identifier_deleteop.py +70 -0
- mixpeek/models/{featureextractionembeddingrequest.py → documenthandlingconfig.py} +12 -15
- mixpeek/models/documentinputhandling.py +11 -0
- mixpeek/models/{jsontextoutputsettings.py → documentlistresponse.py} +15 -14
- mixpeek/models/documentoutputhandling.py +10 -0
- mixpeek/models/documentoutputtype.py +11 -0
- mixpeek/models/documentresponse.py +87 -0
- mixpeek/models/{nodeupdate.py → documentupdate.py} +22 -13
- mixpeek/models/enrichmentfield.py +25 -0
- mixpeek/models/errordetail.py +1 -1
- mixpeek/models/{update_node_v1_entities_taxonomies_nodes_node_patchop.py → execute_retriever_v1_retrievers_retrievers_retriever_id_execute_postop.py} +11 -11
- mixpeek/models/featureextractorconfig.py +116 -0
- mixpeek/models/featureextractordefinition.py +192 -0
- mixpeek/models/filtercondition.py +25 -25
- mixpeek/models/filteroperator.py +24 -0
- mixpeek/models/generativemodels.py +10 -0
- mixpeek/models/{delete_feature_v1_features_feature_id_deleteop.py → get_bucket_v1_buckets_bucket_identifier_getop.py} +5 -5
- mixpeek/models/{list_taxonomies_v1_entities_taxonomies_getop.py → get_cache_stats_v1_collections_cache_stats_getop.py} +16 -14
- mixpeek/models/get_collection_v1_collections_collection_id_getop.py +59 -0
- mixpeek/models/get_document_v1_collections_collection_identifier_documents_document_id_getop.py +70 -0
- mixpeek/models/get_feature_extractor_v1_features_extractors_feature_id_getop.py +16 -0
- mixpeek/models/get_interaction_v1_retrievers_interactions_interaction_id_getop.py +57 -0
- mixpeek/models/{delete_collection_v1_collections_collection_deleteop.py → get_object_v1_buckets_bucket_identifier_objects_object_identifier_getop.py} +16 -7
- mixpeek/models/get_research_v1_research_getop.py +52 -0
- mixpeek/models/get_retriever_stages_v1_retrievers_stages_getop.py +52 -0
- mixpeek/models/{delete_taxonomy_v1_entities_taxonomies_taxonomy_deleteop.py → get_retriever_v1_retrievers_retrievers_retriever_id_getop.py} +5 -7
- mixpeek/models/get_task_v1_tasks_task_id_getop.py +1 -1
- mixpeek/models/getusagerequestmodel.py +91 -0
- mixpeek/models/hdbscanparameters.py +26 -0
- mixpeek/models/interactionresponse.py +86 -0
- mixpeek/models/interactiontype.py +22 -0
- mixpeek/models/{search_features_v1_features_search_postop.py → invalidate_cache_v1_collections_cache_invalidate_postop.py} +60 -34
- mixpeek/models/invalidationevent.py +67 -0
- mixpeek/models/invalidationstrategy.py +12 -0
- mixpeek/models/kill_task_v1_tasks_task_id_deleteop.py +1 -1
- mixpeek/models/list_active_tasks_v1_tasks_getop.py +1 -1
- mixpeek/models/{list_assets_v1_assets_postop.py → list_buckets_v1_buckets_postop.py} +18 -18
- mixpeek/models/{list_features_v1_features_postop.py → list_documents_v1_collections_collection_identifier_documents_getop.py} +54 -19
- mixpeek/models/list_interactions_v1_retrievers_interactions_getop.py +96 -0
- mixpeek/models/{list_classifications_v1_entities_taxonomies_taxonomy_classifications_postop.py → list_objects_v1_buckets_bucket_identifier_objects_postop.py} +22 -29
- mixpeek/models/{groupbyoptionsasset.py → listbucketsrequest.py} +19 -28
- mixpeek/models/listbucketsresponse.py +23 -0
- mixpeek/models/{groupbyoptions.py → listobjectsrequest.py} +19 -28
- mixpeek/models/listobjectsresponse.py +25 -0
- mixpeek/models/listtasksresponse.py +3 -6
- mixpeek/models/{logicaloperator.py → logicaloperator_input.py} +42 -24
- mixpeek/models/logicaloperator_output.py +121 -0
- mixpeek/models/multivectorindex.py +25 -0
- mixpeek/models/namespaceresponse.py +1 -1
- mixpeek/models/namespaceusage.py +45 -0
- mixpeek/models/namingmethod.py +8 -0
- mixpeek/models/objectresponse.py +124 -0
- mixpeek/models/{db_model_paginationresponse.py → paginationresponse.py} +3 -3
- mixpeek/models/payloadindexconfig.py +1 -1
- mixpeek/models/plan.py +82 -0
- mixpeek/models/recomputestrategy.py +12 -0
- mixpeek/models/resourcetotals.py +39 -0
- mixpeek/models/{jsonvideooutputsettings.py → retrieverbinding.py} +19 -11
- mixpeek/models/{logodetectsettings.py → retrievercacheconfig.py} +20 -11
- mixpeek/models/retrievermodel.py +95 -0
- mixpeek/models/retrieverqueryrequest.py +114 -0
- mixpeek/models/retrieverresponse.py +24 -0
- mixpeek/models/searchinteraction.py +81 -0
- mixpeek/models/singlelineageentry.py +99 -0
- mixpeek/models/sortdirection.py +11 -0
- mixpeek/models/sortoption.py +20 -12
- mixpeek/models/sourceconfig_input.py +72 -0
- mixpeek/models/sourceconfig_output.py +75 -0
- mixpeek/models/sourcetype.py +11 -0
- mixpeek/models/stageconfig_input.py +111 -0
- mixpeek/models/stageconfig_output.py +114 -0
- mixpeek/models/stagedefinition.py +110 -0
- mixpeek/models/{jsonimageoutputsettings.py → stageresponse.py} +21 -11
- mixpeek/models/taskresponse.py +1 -1
- mixpeek/models/taskstatus.py +1 -0
- mixpeek/models/{assetfeatures.py → taxonomyapplicationconfig.py} +23 -15
- mixpeek/models/taxonomyconfig.py +19 -0
- mixpeek/models/timeseriesdatapoint.py +25 -0
- mixpeek/models/timeseriesusage.py +36 -0
- mixpeek/models/{full_asset_update_v1_assets_asset_id_putop.py → update_bucket_v1_buckets_bucket_identifier_putop.py} +9 -9
- mixpeek/models/{update_taxonomy_v1_entities_taxonomies_taxonomy_patchop.py → update_document_v1_collections_collection_identifier_documents_document_id_putop.py} +25 -13
- mixpeek/models/{full_feature_update_v1_features_feature_id_putop.py → update_object_v1_buckets_bucket_identifier_objects_object_identifier_putop.py} +20 -9
- mixpeek/models/updatenamespacerequest.py +1 -1
- mixpeek/models/updateobjectrequest.py +75 -0
- mixpeek/models/usageresponse.py +86 -0
- mixpeek/models/usagesummary.py +39 -0
- mixpeek/models/usagetimerange.py +16 -0
- mixpeek/models/usermodel_input.py +3 -0
- mixpeek/models/usermodel_output.py +3 -0
- mixpeek/models/vectorbasedconfig.py +60 -0
- mixpeek/models/{collectionresult.py → vectorindex.py} +20 -15
- mixpeek/models/vectorindexdefinition.py +43 -0
- mixpeek/models/vectortype.py +4 -1
- mixpeek/namespaces.py +26 -480
- mixpeek/organization_notifications.py +214 -0
- mixpeek/organizations.py +6 -210
- mixpeek/{featureextractors.py → organizations_usage.py} +31 -39
- mixpeek/research.py +228 -0
- mixpeek/retriever_interactions.py +1036 -0
- mixpeek/retriever_stages.py +232 -0
- mixpeek/{ingestassets.py → retrievers.py} +209 -271
- mixpeek/sdk.py +40 -23
- mixpeek/taxonomies.py +43 -513
- mixpeek/types/basemodel.py +3 -3
- mixpeek/utils/enums.py +67 -27
- {mixpeek-0.20.20.dist-info → mixpeek-0.21.1.dist-info}/METADATA +68 -50
- mixpeek-0.21.1.dist-info/RECORD +216 -0
- {mixpeek-0.20.20.dist-info → mixpeek-0.21.1.dist-info}/WHEEL +1 -1
- mixpeek/models/actionusage.py +0 -16
- mixpeek/models/assetresponse.py +0 -166
- mixpeek/models/assets_model_searchquery.py +0 -21
- mixpeek/models/assetupdate.py +0 -28
- mixpeek/models/assignmentconfig.py +0 -67
- mixpeek/models/assignmentmode.py +0 -11
- mixpeek/models/availablemodels.py +0 -16
- mixpeek/models/availablemodelsresponse.py +0 -27
- mixpeek/models/classificationmatch.py +0 -77
- mixpeek/models/classificationwithfeature.py +0 -73
- mixpeek/models/collectiondetailsresponse.py +0 -83
- mixpeek/models/dateusage.py +0 -22
- mixpeek/models/denseembedding.py +0 -16
- mixpeek/models/discoverrequest.py +0 -64
- mixpeek/models/embeddingconfig.py +0 -33
- mixpeek/models/embeddingrequest.py +0 -92
- mixpeek/models/embeddingresponse.py +0 -64
- mixpeek/models/entitysettings.py +0 -50
- mixpeek/models/featureoptions.py +0 -25
- mixpeek/models/features_model_paginationresponse.py +0 -59
- mixpeek/models/featureupdaterequest.py +0 -21
- mixpeek/models/get_asset_v1_assets_asset_id_getop.py +0 -73
- mixpeek/models/get_asset_with_features_v1_assets_asset_id_features_getop.py +0 -73
- mixpeek/models/get_collection_details_v1_collections_collection_details_getop.py +0 -59
- mixpeek/models/get_collection_details_v1_collections_collection_getop.py +0 -59
- mixpeek/models/get_feature_v1_features_feature_id_getop.py +0 -70
- mixpeek/models/get_taxonomy_node_v1_entities_taxonomies_nodes_node_getop.py +0 -59
- mixpeek/models/groupedassetdata.py +0 -18
- mixpeek/models/imagedescribesettings.py +0 -82
- mixpeek/models/imagedetectsettings.py +0 -47
- mixpeek/models/imagereadsettings.py +0 -71
- mixpeek/models/imagesettings.py +0 -92
- mixpeek/models/listassetsrequest.py +0 -75
- mixpeek/models/listassetsresponse.py +0 -22
- mixpeek/models/listclassificationsrequest.py +0 -69
- mixpeek/models/listclassificationsresponse.py +0 -31
- mixpeek/models/listcollectionsresponse.py +0 -22
- mixpeek/models/listfeaturesrequest.py +0 -77
- mixpeek/models/listfeaturesresponse.py +0 -22
- mixpeek/models/listtaxonomiesresponse.py +0 -24
- mixpeek/models/modality.py +0 -13
- mixpeek/models/modeldetails.py +0 -61
- mixpeek/models/nodeoptions.py +0 -16
- mixpeek/models/patch_namespace_v1_namespaces_namespace_patchop.py +0 -28
- mixpeek/models/payloadindextype.py +0 -17
- mixpeek/models/processimageurlinput.py +0 -87
- mixpeek/models/processtextinput.py +0 -82
- mixpeek/models/processvideourlinput.py +0 -87
- mixpeek/models/querysettings.py +0 -56
- mixpeek/models/rerankingoptions.py +0 -47
- mixpeek/models/search_model_searchquery.py +0 -76
- mixpeek/models/searchassetsrequest.py +0 -78
- mixpeek/models/searchrequestfeatures.py +0 -153
- mixpeek/models/sparseembedding.py +0 -21
- mixpeek/models/taxonomycreate.py +0 -20
- mixpeek/models/taxonomyextractionconfig.py +0 -26
- mixpeek/models/taxonomymodel.py +0 -27
- mixpeek/models/taxonomynode.py +0 -101
- mixpeek/models/taxonomynodecreate.py +0 -63
- mixpeek/models/textsettings.py +0 -67
- mixpeek/models/updateassetrequest.py +0 -60
- mixpeek/models/usage.py +0 -18
- mixpeek/models/vectormodel.py +0 -15
- mixpeek/models/videodescribesettings.py +0 -82
- mixpeek/models/videodetectsettings.py +0 -47
- mixpeek/models/videoreadsettings.py +0 -71
- mixpeek/models/videosettings.py +0 -115
- mixpeek/models/videotranscriptionsettings.py +0 -69
- mixpeek-0.20.20.dist-info/RECORD +0 -201
mixpeek/namespaces.py
CHANGED
@@ -13,7 +13,13 @@ class Namespaces(BaseSDK):
|
|
13
13
|
self,
|
14
14
|
*,
|
15
15
|
namespace_name: str,
|
16
|
-
|
16
|
+
description: OptionalNullable[str] = UNSET,
|
17
|
+
feature_extractors: Optional[
|
18
|
+
Union[
|
19
|
+
List[models.BasicFeatureExtractor],
|
20
|
+
List[models.BasicFeatureExtractorTypedDict],
|
21
|
+
]
|
22
|
+
] = None,
|
17
23
|
payload_indexes: OptionalNullable[
|
18
24
|
Union[
|
19
25
|
List[models.PayloadIndexConfig],
|
@@ -30,7 +36,8 @@ class Namespaces(BaseSDK):
|
|
30
36
|
Creates a new namespace with the specified configuration
|
31
37
|
|
32
38
|
:param namespace_name: Name of the namespace to create
|
33
|
-
:param
|
39
|
+
:param description: Description of the namespace
|
40
|
+
:param feature_extractors: List of feature extractors to use
|
34
41
|
:param payload_indexes: List of payload index configurations
|
35
42
|
:param retries: Override the default retry configuration for this method
|
36
43
|
:param server_url: Override the default server URL for this method
|
@@ -49,7 +56,10 @@ class Namespaces(BaseSDK):
|
|
49
56
|
|
50
57
|
request = models.CreateNamespaceRequest(
|
51
58
|
namespace_name=namespace_name,
|
52
|
-
|
59
|
+
description=description,
|
60
|
+
feature_extractors=utils.get_pydantic_model(
|
61
|
+
feature_extractors, Optional[List[models.BasicFeatureExtractor]]
|
62
|
+
),
|
53
63
|
payload_indexes=utils.get_pydantic_model(
|
54
64
|
payload_indexes, OptionalNullable[List[models.PayloadIndexConfig]]
|
55
65
|
),
|
@@ -140,7 +150,13 @@ class Namespaces(BaseSDK):
|
|
140
150
|
self,
|
141
151
|
*,
|
142
152
|
namespace_name: str,
|
143
|
-
|
153
|
+
description: OptionalNullable[str] = UNSET,
|
154
|
+
feature_extractors: Optional[
|
155
|
+
Union[
|
156
|
+
List[models.BasicFeatureExtractor],
|
157
|
+
List[models.BasicFeatureExtractorTypedDict],
|
158
|
+
]
|
159
|
+
] = None,
|
144
160
|
payload_indexes: OptionalNullable[
|
145
161
|
Union[
|
146
162
|
List[models.PayloadIndexConfig],
|
@@ -157,7 +173,8 @@ class Namespaces(BaseSDK):
|
|
157
173
|
Creates a new namespace with the specified configuration
|
158
174
|
|
159
175
|
:param namespace_name: Name of the namespace to create
|
160
|
-
:param
|
176
|
+
:param description: Description of the namespace
|
177
|
+
:param feature_extractors: List of feature extractors to use
|
161
178
|
:param payload_indexes: List of payload index configurations
|
162
179
|
:param retries: Override the default retry configuration for this method
|
163
180
|
:param server_url: Override the default server URL for this method
|
@@ -176,7 +193,10 @@ class Namespaces(BaseSDK):
|
|
176
193
|
|
177
194
|
request = models.CreateNamespaceRequest(
|
178
195
|
namespace_name=namespace_name,
|
179
|
-
|
196
|
+
description=description,
|
197
|
+
feature_extractors=utils.get_pydantic_model(
|
198
|
+
feature_extractors, Optional[List[models.BasicFeatureExtractor]]
|
199
|
+
),
|
180
200
|
payload_indexes=utils.get_pydantic_model(
|
181
201
|
payload_indexes, OptionalNullable[List[models.PayloadIndexConfig]]
|
182
202
|
),
|
@@ -693,272 +713,6 @@ class Namespaces(BaseSDK):
|
|
693
713
|
http_res,
|
694
714
|
)
|
695
715
|
|
696
|
-
def patch_namespace_v1_namespaces_namespace_patch(
|
697
|
-
self,
|
698
|
-
*,
|
699
|
-
namespace: str,
|
700
|
-
namespace_name: OptionalNullable[str] = UNSET,
|
701
|
-
payload_indexes: OptionalNullable[
|
702
|
-
Union[
|
703
|
-
List[models.PayloadIndexConfig],
|
704
|
-
List[models.PayloadIndexConfigTypedDict],
|
705
|
-
]
|
706
|
-
] = UNSET,
|
707
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
708
|
-
server_url: Optional[str] = None,
|
709
|
-
timeout_ms: Optional[int] = None,
|
710
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
711
|
-
) -> models.NamespaceResponse:
|
712
|
-
r"""Partially Update Namespace
|
713
|
-
|
714
|
-
Updates specific fields of an existing namespace
|
715
|
-
|
716
|
-
:param namespace: Either the namespace name or namespace ID
|
717
|
-
:param namespace_name: Name of the namespace to update
|
718
|
-
:param payload_indexes: Updated list of payload index configurations
|
719
|
-
:param retries: Override the default retry configuration for this method
|
720
|
-
:param server_url: Override the default server URL for this method
|
721
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
722
|
-
:param http_headers: Additional headers to set or replace on requests.
|
723
|
-
"""
|
724
|
-
base_url = None
|
725
|
-
url_variables = None
|
726
|
-
if timeout_ms is None:
|
727
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
728
|
-
|
729
|
-
if server_url is not None:
|
730
|
-
base_url = server_url
|
731
|
-
else:
|
732
|
-
base_url = self._get_url(base_url, url_variables)
|
733
|
-
|
734
|
-
request = models.PatchNamespaceV1NamespacesNamespacePatchRequest(
|
735
|
-
namespace=namespace,
|
736
|
-
update_namespace_request=models.UpdateNamespaceRequest(
|
737
|
-
namespace_name=namespace_name,
|
738
|
-
payload_indexes=utils.get_pydantic_model(
|
739
|
-
payload_indexes, OptionalNullable[List[models.PayloadIndexConfig]]
|
740
|
-
),
|
741
|
-
),
|
742
|
-
)
|
743
|
-
|
744
|
-
req = self._build_request(
|
745
|
-
method="PATCH",
|
746
|
-
path="/v1/namespaces/{namespace}",
|
747
|
-
base_url=base_url,
|
748
|
-
url_variables=url_variables,
|
749
|
-
request=request,
|
750
|
-
request_body_required=True,
|
751
|
-
request_has_path_params=True,
|
752
|
-
request_has_query_params=True,
|
753
|
-
user_agent_header="user-agent",
|
754
|
-
accept_header_value="application/json",
|
755
|
-
http_headers=http_headers,
|
756
|
-
security=self.sdk_configuration.security,
|
757
|
-
get_serialized_body=lambda: utils.serialize_request_body(
|
758
|
-
request.update_namespace_request,
|
759
|
-
False,
|
760
|
-
False,
|
761
|
-
"json",
|
762
|
-
models.UpdateNamespaceRequest,
|
763
|
-
),
|
764
|
-
timeout_ms=timeout_ms,
|
765
|
-
)
|
766
|
-
|
767
|
-
if retries == UNSET:
|
768
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
769
|
-
retries = self.sdk_configuration.retry_config
|
770
|
-
|
771
|
-
retry_config = None
|
772
|
-
if isinstance(retries, utils.RetryConfig):
|
773
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
774
|
-
|
775
|
-
http_res = self.do_request(
|
776
|
-
hook_ctx=HookContext(
|
777
|
-
base_url=base_url or "",
|
778
|
-
operation_id="patch_namespace_v1_namespaces__namespace__patch",
|
779
|
-
oauth2_scopes=[],
|
780
|
-
security_source=get_security_from_env(
|
781
|
-
self.sdk_configuration.security, models.Security
|
782
|
-
),
|
783
|
-
),
|
784
|
-
request=req,
|
785
|
-
error_status_codes=["400", "401", "403", "404", "422", "4XX", "500", "5XX"],
|
786
|
-
retry_config=retry_config,
|
787
|
-
)
|
788
|
-
|
789
|
-
response_data: Any = None
|
790
|
-
if utils.match_response(http_res, "200", "application/json"):
|
791
|
-
return utils.unmarshal_json(http_res.text, models.NamespaceResponse)
|
792
|
-
if utils.match_response(
|
793
|
-
http_res, ["400", "401", "403", "404"], "application/json"
|
794
|
-
):
|
795
|
-
response_data = utils.unmarshal_json(
|
796
|
-
http_res.text, models.ErrorResponseData
|
797
|
-
)
|
798
|
-
raise models.ErrorResponse(data=response_data)
|
799
|
-
if utils.match_response(http_res, "422", "application/json"):
|
800
|
-
response_data = utils.unmarshal_json(
|
801
|
-
http_res.text, models.HTTPValidationErrorData
|
802
|
-
)
|
803
|
-
raise models.HTTPValidationError(data=response_data)
|
804
|
-
if utils.match_response(http_res, "500", "application/json"):
|
805
|
-
response_data = utils.unmarshal_json(
|
806
|
-
http_res.text, models.ErrorResponseData
|
807
|
-
)
|
808
|
-
raise models.ErrorResponse(data=response_data)
|
809
|
-
if utils.match_response(http_res, "4XX", "*"):
|
810
|
-
http_res_text = utils.stream_to_text(http_res)
|
811
|
-
raise models.APIError(
|
812
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
813
|
-
)
|
814
|
-
if utils.match_response(http_res, "5XX", "*"):
|
815
|
-
http_res_text = utils.stream_to_text(http_res)
|
816
|
-
raise models.APIError(
|
817
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
818
|
-
)
|
819
|
-
|
820
|
-
content_type = http_res.headers.get("Content-Type")
|
821
|
-
http_res_text = utils.stream_to_text(http_res)
|
822
|
-
raise models.APIError(
|
823
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
824
|
-
http_res.status_code,
|
825
|
-
http_res_text,
|
826
|
-
http_res,
|
827
|
-
)
|
828
|
-
|
829
|
-
async def patch_namespace_v1_namespaces_namespace_patch_async(
|
830
|
-
self,
|
831
|
-
*,
|
832
|
-
namespace: str,
|
833
|
-
namespace_name: OptionalNullable[str] = UNSET,
|
834
|
-
payload_indexes: OptionalNullable[
|
835
|
-
Union[
|
836
|
-
List[models.PayloadIndexConfig],
|
837
|
-
List[models.PayloadIndexConfigTypedDict],
|
838
|
-
]
|
839
|
-
] = UNSET,
|
840
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
841
|
-
server_url: Optional[str] = None,
|
842
|
-
timeout_ms: Optional[int] = None,
|
843
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
844
|
-
) -> models.NamespaceResponse:
|
845
|
-
r"""Partially Update Namespace
|
846
|
-
|
847
|
-
Updates specific fields of an existing namespace
|
848
|
-
|
849
|
-
:param namespace: Either the namespace name or namespace ID
|
850
|
-
:param namespace_name: Name of the namespace to update
|
851
|
-
:param payload_indexes: Updated list of payload index configurations
|
852
|
-
:param retries: Override the default retry configuration for this method
|
853
|
-
:param server_url: Override the default server URL for this method
|
854
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
855
|
-
:param http_headers: Additional headers to set or replace on requests.
|
856
|
-
"""
|
857
|
-
base_url = None
|
858
|
-
url_variables = None
|
859
|
-
if timeout_ms is None:
|
860
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
861
|
-
|
862
|
-
if server_url is not None:
|
863
|
-
base_url = server_url
|
864
|
-
else:
|
865
|
-
base_url = self._get_url(base_url, url_variables)
|
866
|
-
|
867
|
-
request = models.PatchNamespaceV1NamespacesNamespacePatchRequest(
|
868
|
-
namespace=namespace,
|
869
|
-
update_namespace_request=models.UpdateNamespaceRequest(
|
870
|
-
namespace_name=namespace_name,
|
871
|
-
payload_indexes=utils.get_pydantic_model(
|
872
|
-
payload_indexes, OptionalNullable[List[models.PayloadIndexConfig]]
|
873
|
-
),
|
874
|
-
),
|
875
|
-
)
|
876
|
-
|
877
|
-
req = self._build_request_async(
|
878
|
-
method="PATCH",
|
879
|
-
path="/v1/namespaces/{namespace}",
|
880
|
-
base_url=base_url,
|
881
|
-
url_variables=url_variables,
|
882
|
-
request=request,
|
883
|
-
request_body_required=True,
|
884
|
-
request_has_path_params=True,
|
885
|
-
request_has_query_params=True,
|
886
|
-
user_agent_header="user-agent",
|
887
|
-
accept_header_value="application/json",
|
888
|
-
http_headers=http_headers,
|
889
|
-
security=self.sdk_configuration.security,
|
890
|
-
get_serialized_body=lambda: utils.serialize_request_body(
|
891
|
-
request.update_namespace_request,
|
892
|
-
False,
|
893
|
-
False,
|
894
|
-
"json",
|
895
|
-
models.UpdateNamespaceRequest,
|
896
|
-
),
|
897
|
-
timeout_ms=timeout_ms,
|
898
|
-
)
|
899
|
-
|
900
|
-
if retries == UNSET:
|
901
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
902
|
-
retries = self.sdk_configuration.retry_config
|
903
|
-
|
904
|
-
retry_config = None
|
905
|
-
if isinstance(retries, utils.RetryConfig):
|
906
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
907
|
-
|
908
|
-
http_res = await self.do_request_async(
|
909
|
-
hook_ctx=HookContext(
|
910
|
-
base_url=base_url or "",
|
911
|
-
operation_id="patch_namespace_v1_namespaces__namespace__patch",
|
912
|
-
oauth2_scopes=[],
|
913
|
-
security_source=get_security_from_env(
|
914
|
-
self.sdk_configuration.security, models.Security
|
915
|
-
),
|
916
|
-
),
|
917
|
-
request=req,
|
918
|
-
error_status_codes=["400", "401", "403", "404", "422", "4XX", "500", "5XX"],
|
919
|
-
retry_config=retry_config,
|
920
|
-
)
|
921
|
-
|
922
|
-
response_data: Any = None
|
923
|
-
if utils.match_response(http_res, "200", "application/json"):
|
924
|
-
return utils.unmarshal_json(http_res.text, models.NamespaceResponse)
|
925
|
-
if utils.match_response(
|
926
|
-
http_res, ["400", "401", "403", "404"], "application/json"
|
927
|
-
):
|
928
|
-
response_data = utils.unmarshal_json(
|
929
|
-
http_res.text, models.ErrorResponseData
|
930
|
-
)
|
931
|
-
raise models.ErrorResponse(data=response_data)
|
932
|
-
if utils.match_response(http_res, "422", "application/json"):
|
933
|
-
response_data = utils.unmarshal_json(
|
934
|
-
http_res.text, models.HTTPValidationErrorData
|
935
|
-
)
|
936
|
-
raise models.HTTPValidationError(data=response_data)
|
937
|
-
if utils.match_response(http_res, "500", "application/json"):
|
938
|
-
response_data = utils.unmarshal_json(
|
939
|
-
http_res.text, models.ErrorResponseData
|
940
|
-
)
|
941
|
-
raise models.ErrorResponse(data=response_data)
|
942
|
-
if utils.match_response(http_res, "4XX", "*"):
|
943
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
944
|
-
raise models.APIError(
|
945
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
946
|
-
)
|
947
|
-
if utils.match_response(http_res, "5XX", "*"):
|
948
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
949
|
-
raise models.APIError(
|
950
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
951
|
-
)
|
952
|
-
|
953
|
-
content_type = http_res.headers.get("Content-Type")
|
954
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
955
|
-
raise models.APIError(
|
956
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
957
|
-
http_res.status_code,
|
958
|
-
http_res_text,
|
959
|
-
http_res,
|
960
|
-
)
|
961
|
-
|
962
716
|
def update(
|
963
717
|
self,
|
964
718
|
*,
|
@@ -1446,211 +1200,3 @@ class Namespaces(BaseSDK):
|
|
1446
1200
|
http_res_text,
|
1447
1201
|
http_res,
|
1448
1202
|
)
|
1449
|
-
|
1450
|
-
def list_models(
|
1451
|
-
self,
|
1452
|
-
*,
|
1453
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
1454
|
-
server_url: Optional[str] = None,
|
1455
|
-
timeout_ms: Optional[int] = None,
|
1456
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
1457
|
-
) -> models.AvailableModelsResponse:
|
1458
|
-
r"""List Available Models
|
1459
|
-
|
1460
|
-
Returns all available models and their configurations, scoped to the organization
|
1461
|
-
|
1462
|
-
:param retries: Override the default retry configuration for this method
|
1463
|
-
:param server_url: Override the default server URL for this method
|
1464
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
1465
|
-
:param http_headers: Additional headers to set or replace on requests.
|
1466
|
-
"""
|
1467
|
-
base_url = None
|
1468
|
-
url_variables = None
|
1469
|
-
if timeout_ms is None:
|
1470
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
1471
|
-
|
1472
|
-
if server_url is not None:
|
1473
|
-
base_url = server_url
|
1474
|
-
else:
|
1475
|
-
base_url = self._get_url(base_url, url_variables)
|
1476
|
-
req = self._build_request(
|
1477
|
-
method="GET",
|
1478
|
-
path="/v1/namespaces/models",
|
1479
|
-
base_url=base_url,
|
1480
|
-
url_variables=url_variables,
|
1481
|
-
request=None,
|
1482
|
-
request_body_required=False,
|
1483
|
-
request_has_path_params=False,
|
1484
|
-
request_has_query_params=True,
|
1485
|
-
user_agent_header="user-agent",
|
1486
|
-
accept_header_value="application/json",
|
1487
|
-
http_headers=http_headers,
|
1488
|
-
security=self.sdk_configuration.security,
|
1489
|
-
timeout_ms=timeout_ms,
|
1490
|
-
)
|
1491
|
-
|
1492
|
-
if retries == UNSET:
|
1493
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
1494
|
-
retries = self.sdk_configuration.retry_config
|
1495
|
-
|
1496
|
-
retry_config = None
|
1497
|
-
if isinstance(retries, utils.RetryConfig):
|
1498
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
1499
|
-
|
1500
|
-
http_res = self.do_request(
|
1501
|
-
hook_ctx=HookContext(
|
1502
|
-
base_url=base_url or "",
|
1503
|
-
operation_id="list_available_models_v1_namespaces_models_get",
|
1504
|
-
oauth2_scopes=[],
|
1505
|
-
security_source=get_security_from_env(
|
1506
|
-
self.sdk_configuration.security, models.Security
|
1507
|
-
),
|
1508
|
-
),
|
1509
|
-
request=req,
|
1510
|
-
error_status_codes=["400", "401", "403", "404", "422", "4XX", "500", "5XX"],
|
1511
|
-
retry_config=retry_config,
|
1512
|
-
)
|
1513
|
-
|
1514
|
-
response_data: Any = None
|
1515
|
-
if utils.match_response(http_res, "200", "application/json"):
|
1516
|
-
return utils.unmarshal_json(http_res.text, models.AvailableModelsResponse)
|
1517
|
-
if utils.match_response(
|
1518
|
-
http_res, ["400", "401", "403", "404"], "application/json"
|
1519
|
-
):
|
1520
|
-
response_data = utils.unmarshal_json(
|
1521
|
-
http_res.text, models.ErrorResponseData
|
1522
|
-
)
|
1523
|
-
raise models.ErrorResponse(data=response_data)
|
1524
|
-
if utils.match_response(http_res, "422", "application/json"):
|
1525
|
-
response_data = utils.unmarshal_json(
|
1526
|
-
http_res.text, models.HTTPValidationErrorData
|
1527
|
-
)
|
1528
|
-
raise models.HTTPValidationError(data=response_data)
|
1529
|
-
if utils.match_response(http_res, "500", "application/json"):
|
1530
|
-
response_data = utils.unmarshal_json(
|
1531
|
-
http_res.text, models.ErrorResponseData
|
1532
|
-
)
|
1533
|
-
raise models.ErrorResponse(data=response_data)
|
1534
|
-
if utils.match_response(http_res, "4XX", "*"):
|
1535
|
-
http_res_text = utils.stream_to_text(http_res)
|
1536
|
-
raise models.APIError(
|
1537
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
1538
|
-
)
|
1539
|
-
if utils.match_response(http_res, "5XX", "*"):
|
1540
|
-
http_res_text = utils.stream_to_text(http_res)
|
1541
|
-
raise models.APIError(
|
1542
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
1543
|
-
)
|
1544
|
-
|
1545
|
-
content_type = http_res.headers.get("Content-Type")
|
1546
|
-
http_res_text = utils.stream_to_text(http_res)
|
1547
|
-
raise models.APIError(
|
1548
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
1549
|
-
http_res.status_code,
|
1550
|
-
http_res_text,
|
1551
|
-
http_res,
|
1552
|
-
)
|
1553
|
-
|
1554
|
-
async def list_models_async(
|
1555
|
-
self,
|
1556
|
-
*,
|
1557
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
1558
|
-
server_url: Optional[str] = None,
|
1559
|
-
timeout_ms: Optional[int] = None,
|
1560
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
1561
|
-
) -> models.AvailableModelsResponse:
|
1562
|
-
r"""List Available Models
|
1563
|
-
|
1564
|
-
Returns all available models and their configurations, scoped to the organization
|
1565
|
-
|
1566
|
-
:param retries: Override the default retry configuration for this method
|
1567
|
-
:param server_url: Override the default server URL for this method
|
1568
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
1569
|
-
:param http_headers: Additional headers to set or replace on requests.
|
1570
|
-
"""
|
1571
|
-
base_url = None
|
1572
|
-
url_variables = None
|
1573
|
-
if timeout_ms is None:
|
1574
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
1575
|
-
|
1576
|
-
if server_url is not None:
|
1577
|
-
base_url = server_url
|
1578
|
-
else:
|
1579
|
-
base_url = self._get_url(base_url, url_variables)
|
1580
|
-
req = self._build_request_async(
|
1581
|
-
method="GET",
|
1582
|
-
path="/v1/namespaces/models",
|
1583
|
-
base_url=base_url,
|
1584
|
-
url_variables=url_variables,
|
1585
|
-
request=None,
|
1586
|
-
request_body_required=False,
|
1587
|
-
request_has_path_params=False,
|
1588
|
-
request_has_query_params=True,
|
1589
|
-
user_agent_header="user-agent",
|
1590
|
-
accept_header_value="application/json",
|
1591
|
-
http_headers=http_headers,
|
1592
|
-
security=self.sdk_configuration.security,
|
1593
|
-
timeout_ms=timeout_ms,
|
1594
|
-
)
|
1595
|
-
|
1596
|
-
if retries == UNSET:
|
1597
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
1598
|
-
retries = self.sdk_configuration.retry_config
|
1599
|
-
|
1600
|
-
retry_config = None
|
1601
|
-
if isinstance(retries, utils.RetryConfig):
|
1602
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
1603
|
-
|
1604
|
-
http_res = await self.do_request_async(
|
1605
|
-
hook_ctx=HookContext(
|
1606
|
-
base_url=base_url or "",
|
1607
|
-
operation_id="list_available_models_v1_namespaces_models_get",
|
1608
|
-
oauth2_scopes=[],
|
1609
|
-
security_source=get_security_from_env(
|
1610
|
-
self.sdk_configuration.security, models.Security
|
1611
|
-
),
|
1612
|
-
),
|
1613
|
-
request=req,
|
1614
|
-
error_status_codes=["400", "401", "403", "404", "422", "4XX", "500", "5XX"],
|
1615
|
-
retry_config=retry_config,
|
1616
|
-
)
|
1617
|
-
|
1618
|
-
response_data: Any = None
|
1619
|
-
if utils.match_response(http_res, "200", "application/json"):
|
1620
|
-
return utils.unmarshal_json(http_res.text, models.AvailableModelsResponse)
|
1621
|
-
if utils.match_response(
|
1622
|
-
http_res, ["400", "401", "403", "404"], "application/json"
|
1623
|
-
):
|
1624
|
-
response_data = utils.unmarshal_json(
|
1625
|
-
http_res.text, models.ErrorResponseData
|
1626
|
-
)
|
1627
|
-
raise models.ErrorResponse(data=response_data)
|
1628
|
-
if utils.match_response(http_res, "422", "application/json"):
|
1629
|
-
response_data = utils.unmarshal_json(
|
1630
|
-
http_res.text, models.HTTPValidationErrorData
|
1631
|
-
)
|
1632
|
-
raise models.HTTPValidationError(data=response_data)
|
1633
|
-
if utils.match_response(http_res, "500", "application/json"):
|
1634
|
-
response_data = utils.unmarshal_json(
|
1635
|
-
http_res.text, models.ErrorResponseData
|
1636
|
-
)
|
1637
|
-
raise models.ErrorResponse(data=response_data)
|
1638
|
-
if utils.match_response(http_res, "4XX", "*"):
|
1639
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
1640
|
-
raise models.APIError(
|
1641
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
1642
|
-
)
|
1643
|
-
if utils.match_response(http_res, "5XX", "*"):
|
1644
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
1645
|
-
raise models.APIError(
|
1646
|
-
"API error occurred", http_res.status_code, http_res_text, http_res
|
1647
|
-
)
|
1648
|
-
|
1649
|
-
content_type = http_res.headers.get("Content-Type")
|
1650
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
1651
|
-
raise models.APIError(
|
1652
|
-
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
1653
|
-
http_res.status_code,
|
1654
|
-
http_res_text,
|
1655
|
-
http_res,
|
1656
|
-
)
|