mixpeek 0.20.20__py3-none-any.whl → 0.21.6__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 → bucketobjects.py} +309 -793
- mixpeek/buckets.py +1292 -0
- mixpeek/clusters.py +306 -0
- mixpeek/collectioncache.py +820 -0
- mixpeek/{taxonomyentities.py → collectiondocuments.py} +305 -559
- mixpeek/collections.py +120 -994
- 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/organizationnotifications.py +214 -0
- mixpeek/organizations.py +6 -210
- mixpeek/{featureextractors.py → organizationsusage.py} +31 -39
- mixpeek/research.py +228 -0
- mixpeek/retrieverinteractions.py +1036 -0
- mixpeek/{ingestassets.py → retrievers.py} +209 -271
- mixpeek/retrieverstages.py +232 -0
- 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.6.dist-info}/METADATA +68 -50
- mixpeek-0.21.6.dist-info/RECORD +216 -0
- {mixpeek-0.20.20.dist-info → mixpeek-0.21.6.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
@@ -0,0 +1,232 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from .basesdk import BaseSDK
|
4
|
+
from mixpeek import models, utils
|
5
|
+
from mixpeek._hooks import HookContext
|
6
|
+
from mixpeek.types import OptionalNullable, UNSET
|
7
|
+
from mixpeek.utils import get_security_from_env
|
8
|
+
from typing import Any, List, Mapping, Optional
|
9
|
+
|
10
|
+
|
11
|
+
class RetrieverStages(BaseSDK):
|
12
|
+
def list(
|
13
|
+
self,
|
14
|
+
*,
|
15
|
+
x_namespace: OptionalNullable[str] = UNSET,
|
16
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
17
|
+
server_url: Optional[str] = None,
|
18
|
+
timeout_ms: Optional[int] = None,
|
19
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
20
|
+
) -> List[models.StageDefinition]:
|
21
|
+
r"""List Retriever Stages
|
22
|
+
|
23
|
+
List all available retriever stages from the registry
|
24
|
+
|
25
|
+
:param x_namespace: Optional namespace for data isolation. This can be a namespace name or namespace ID. Example: 'netflix_prod' or 'ns_1234567890'. To create a namespace, use the /namespaces endpoint.
|
26
|
+
:param retries: Override the default retry configuration for this method
|
27
|
+
:param server_url: Override the default server URL for this method
|
28
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
29
|
+
:param http_headers: Additional headers to set or replace on requests.
|
30
|
+
"""
|
31
|
+
base_url = None
|
32
|
+
url_variables = None
|
33
|
+
if timeout_ms is None:
|
34
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
35
|
+
|
36
|
+
if server_url is not None:
|
37
|
+
base_url = server_url
|
38
|
+
else:
|
39
|
+
base_url = self._get_url(base_url, url_variables)
|
40
|
+
|
41
|
+
request = models.GetRetrieverStagesV1RetrieversStagesGetRequest(
|
42
|
+
x_namespace=x_namespace,
|
43
|
+
)
|
44
|
+
|
45
|
+
req = self._build_request(
|
46
|
+
method="GET",
|
47
|
+
path="/v1/retrievers/stages",
|
48
|
+
base_url=base_url,
|
49
|
+
url_variables=url_variables,
|
50
|
+
request=request,
|
51
|
+
request_body_required=False,
|
52
|
+
request_has_path_params=False,
|
53
|
+
request_has_query_params=True,
|
54
|
+
user_agent_header="user-agent",
|
55
|
+
accept_header_value="application/json",
|
56
|
+
http_headers=http_headers,
|
57
|
+
security=self.sdk_configuration.security,
|
58
|
+
timeout_ms=timeout_ms,
|
59
|
+
)
|
60
|
+
|
61
|
+
if retries == UNSET:
|
62
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
63
|
+
retries = self.sdk_configuration.retry_config
|
64
|
+
|
65
|
+
retry_config = None
|
66
|
+
if isinstance(retries, utils.RetryConfig):
|
67
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
68
|
+
|
69
|
+
http_res = self.do_request(
|
70
|
+
hook_ctx=HookContext(
|
71
|
+
base_url=base_url or "",
|
72
|
+
operation_id="get_retriever_stages_v1_retrievers_stages_get",
|
73
|
+
oauth2_scopes=[],
|
74
|
+
security_source=get_security_from_env(
|
75
|
+
self.sdk_configuration.security, models.Security
|
76
|
+
),
|
77
|
+
),
|
78
|
+
request=req,
|
79
|
+
error_status_codes=["400", "401", "403", "404", "422", "4XX", "500", "5XX"],
|
80
|
+
retry_config=retry_config,
|
81
|
+
)
|
82
|
+
|
83
|
+
response_data: Any = None
|
84
|
+
if utils.match_response(http_res, "200", "application/json"):
|
85
|
+
return utils.unmarshal_json(http_res.text, List[models.StageDefinition])
|
86
|
+
if utils.match_response(
|
87
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
88
|
+
):
|
89
|
+
response_data = utils.unmarshal_json(
|
90
|
+
http_res.text, models.ErrorResponseData
|
91
|
+
)
|
92
|
+
raise models.ErrorResponse(data=response_data)
|
93
|
+
if utils.match_response(http_res, "422", "application/json"):
|
94
|
+
response_data = utils.unmarshal_json(
|
95
|
+
http_res.text, models.HTTPValidationErrorData
|
96
|
+
)
|
97
|
+
raise models.HTTPValidationError(data=response_data)
|
98
|
+
if utils.match_response(http_res, "500", "application/json"):
|
99
|
+
response_data = utils.unmarshal_json(
|
100
|
+
http_res.text, models.ErrorResponseData
|
101
|
+
)
|
102
|
+
raise models.ErrorResponse(data=response_data)
|
103
|
+
if utils.match_response(http_res, "4XX", "*"):
|
104
|
+
http_res_text = utils.stream_to_text(http_res)
|
105
|
+
raise models.APIError(
|
106
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
107
|
+
)
|
108
|
+
if utils.match_response(http_res, "5XX", "*"):
|
109
|
+
http_res_text = utils.stream_to_text(http_res)
|
110
|
+
raise models.APIError(
|
111
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
112
|
+
)
|
113
|
+
|
114
|
+
content_type = http_res.headers.get("Content-Type")
|
115
|
+
http_res_text = utils.stream_to_text(http_res)
|
116
|
+
raise models.APIError(
|
117
|
+
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
118
|
+
http_res.status_code,
|
119
|
+
http_res_text,
|
120
|
+
http_res,
|
121
|
+
)
|
122
|
+
|
123
|
+
async def list_async(
|
124
|
+
self,
|
125
|
+
*,
|
126
|
+
x_namespace: OptionalNullable[str] = UNSET,
|
127
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
128
|
+
server_url: Optional[str] = None,
|
129
|
+
timeout_ms: Optional[int] = None,
|
130
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
131
|
+
) -> List[models.StageDefinition]:
|
132
|
+
r"""List Retriever Stages
|
133
|
+
|
134
|
+
List all available retriever stages from the registry
|
135
|
+
|
136
|
+
:param x_namespace: Optional namespace for data isolation. This can be a namespace name or namespace ID. Example: 'netflix_prod' or 'ns_1234567890'. To create a namespace, use the /namespaces endpoint.
|
137
|
+
:param retries: Override the default retry configuration for this method
|
138
|
+
:param server_url: Override the default server URL for this method
|
139
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
140
|
+
:param http_headers: Additional headers to set or replace on requests.
|
141
|
+
"""
|
142
|
+
base_url = None
|
143
|
+
url_variables = None
|
144
|
+
if timeout_ms is None:
|
145
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
146
|
+
|
147
|
+
if server_url is not None:
|
148
|
+
base_url = server_url
|
149
|
+
else:
|
150
|
+
base_url = self._get_url(base_url, url_variables)
|
151
|
+
|
152
|
+
request = models.GetRetrieverStagesV1RetrieversStagesGetRequest(
|
153
|
+
x_namespace=x_namespace,
|
154
|
+
)
|
155
|
+
|
156
|
+
req = self._build_request_async(
|
157
|
+
method="GET",
|
158
|
+
path="/v1/retrievers/stages",
|
159
|
+
base_url=base_url,
|
160
|
+
url_variables=url_variables,
|
161
|
+
request=request,
|
162
|
+
request_body_required=False,
|
163
|
+
request_has_path_params=False,
|
164
|
+
request_has_query_params=True,
|
165
|
+
user_agent_header="user-agent",
|
166
|
+
accept_header_value="application/json",
|
167
|
+
http_headers=http_headers,
|
168
|
+
security=self.sdk_configuration.security,
|
169
|
+
timeout_ms=timeout_ms,
|
170
|
+
)
|
171
|
+
|
172
|
+
if retries == UNSET:
|
173
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
174
|
+
retries = self.sdk_configuration.retry_config
|
175
|
+
|
176
|
+
retry_config = None
|
177
|
+
if isinstance(retries, utils.RetryConfig):
|
178
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
179
|
+
|
180
|
+
http_res = await self.do_request_async(
|
181
|
+
hook_ctx=HookContext(
|
182
|
+
base_url=base_url or "",
|
183
|
+
operation_id="get_retriever_stages_v1_retrievers_stages_get",
|
184
|
+
oauth2_scopes=[],
|
185
|
+
security_source=get_security_from_env(
|
186
|
+
self.sdk_configuration.security, models.Security
|
187
|
+
),
|
188
|
+
),
|
189
|
+
request=req,
|
190
|
+
error_status_codes=["400", "401", "403", "404", "422", "4XX", "500", "5XX"],
|
191
|
+
retry_config=retry_config,
|
192
|
+
)
|
193
|
+
|
194
|
+
response_data: Any = None
|
195
|
+
if utils.match_response(http_res, "200", "application/json"):
|
196
|
+
return utils.unmarshal_json(http_res.text, List[models.StageDefinition])
|
197
|
+
if utils.match_response(
|
198
|
+
http_res, ["400", "401", "403", "404"], "application/json"
|
199
|
+
):
|
200
|
+
response_data = utils.unmarshal_json(
|
201
|
+
http_res.text, models.ErrorResponseData
|
202
|
+
)
|
203
|
+
raise models.ErrorResponse(data=response_data)
|
204
|
+
if utils.match_response(http_res, "422", "application/json"):
|
205
|
+
response_data = utils.unmarshal_json(
|
206
|
+
http_res.text, models.HTTPValidationErrorData
|
207
|
+
)
|
208
|
+
raise models.HTTPValidationError(data=response_data)
|
209
|
+
if utils.match_response(http_res, "500", "application/json"):
|
210
|
+
response_data = utils.unmarshal_json(
|
211
|
+
http_res.text, models.ErrorResponseData
|
212
|
+
)
|
213
|
+
raise models.ErrorResponse(data=response_data)
|
214
|
+
if utils.match_response(http_res, "4XX", "*"):
|
215
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
216
|
+
raise models.APIError(
|
217
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
218
|
+
)
|
219
|
+
if utils.match_response(http_res, "5XX", "*"):
|
220
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
221
|
+
raise models.APIError(
|
222
|
+
"API error occurred", http_res.status_code, http_res_text, http_res
|
223
|
+
)
|
224
|
+
|
225
|
+
content_type = http_res.headers.get("Content-Type")
|
226
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
227
|
+
raise models.APIError(
|
228
|
+
f"Unexpected response received (code: {http_res.status_code}, type: {content_type})",
|
229
|
+
http_res.status_code,
|
230
|
+
http_res_text,
|
231
|
+
http_res,
|
232
|
+
)
|
mixpeek/sdk.py
CHANGED
@@ -8,18 +8,25 @@ from .utils.retries import RetryConfig
|
|
8
8
|
import httpx
|
9
9
|
from mixpeek import models, utils
|
10
10
|
from mixpeek._hooks import SDKHooks
|
11
|
-
from mixpeek.
|
11
|
+
from mixpeek.bucketobjects import BucketObjects
|
12
|
+
from mixpeek.buckets import Buckets
|
13
|
+
from mixpeek.clusters import Clusters
|
14
|
+
from mixpeek.collectioncache import CollectionCache
|
15
|
+
from mixpeek.collectiondocuments import CollectionDocuments
|
12
16
|
from mixpeek.collections import Collections
|
13
|
-
from mixpeek.featureextractors import FeatureExtractors
|
14
17
|
from mixpeek.features import Features
|
15
18
|
from mixpeek.health import Health
|
16
|
-
from mixpeek.ingestassets import IngestAssets
|
17
19
|
from mixpeek.models import internal
|
18
20
|
from mixpeek.namespaces import Namespaces
|
21
|
+
from mixpeek.organizationnotifications import OrganizationNotifications
|
19
22
|
from mixpeek.organizations import Organizations
|
23
|
+
from mixpeek.organizationsusage import OrganizationsUsage
|
24
|
+
from mixpeek.research import Research
|
25
|
+
from mixpeek.retrieverinteractions import RetrieverInteractions
|
26
|
+
from mixpeek.retrievers import Retrievers
|
27
|
+
from mixpeek.retrieverstages import RetrieverStages
|
20
28
|
from mixpeek.tasks import Tasks
|
21
29
|
from mixpeek.taxonomies import Taxonomies
|
22
|
-
from mixpeek.taxonomyentities import TaxonomyEntities
|
23
30
|
from mixpeek.types import OptionalNullable, UNSET
|
24
31
|
from mixpeek.users import Users
|
25
32
|
from typing import Any, Callable, Dict, Optional, Union, cast
|
@@ -27,26 +34,27 @@ import weakref
|
|
27
34
|
|
28
35
|
|
29
36
|
class Mixpeek(BaseSDK):
|
30
|
-
r"""Mixpeek API: This is the Mixpeek API, providing access to various endpoints for data processing and retrieval.
|
31
|
-
|
32
|
-
Download OpenAPI Specification:
|
33
|
-
- [OpenAPI JSON](/openapi.json)
|
34
|
-
- [OpenAPI YAML](/openapi.yaml)
|
35
|
-
|
36
|
-
"""
|
37
|
+
r"""Mixpeek API: This is the Mixpeek API, providing access to various endpoints for data processing and retrieval."""
|
37
38
|
|
38
39
|
health: Health
|
39
40
|
organizations: Organizations
|
40
41
|
users: Users
|
42
|
+
organizations_usage: OrganizationsUsage
|
43
|
+
organization_notifications: OrganizationNotifications
|
41
44
|
namespaces: Namespaces
|
42
|
-
|
43
|
-
|
44
|
-
ingest_assets: IngestAssets
|
45
|
-
taxonomy_entities: TaxonomyEntities
|
46
|
-
taxonomies: Taxonomies
|
47
|
-
assets: Assets
|
45
|
+
buckets: Buckets
|
46
|
+
bucket_objects: BucketObjects
|
48
47
|
collections: Collections
|
48
|
+
collection_cache: CollectionCache
|
49
|
+
collection_documents: CollectionDocuments
|
50
|
+
features: Features
|
51
|
+
retrievers: Retrievers
|
52
|
+
retriever_stages: RetrieverStages
|
53
|
+
retriever_interactions: RetrieverInteractions
|
49
54
|
tasks: Tasks
|
55
|
+
research: Research
|
56
|
+
taxonomies: Taxonomies
|
57
|
+
clusters: Clusters
|
50
58
|
|
51
59
|
def __init__(
|
52
60
|
self,
|
@@ -156,15 +164,24 @@ class Mixpeek(BaseSDK):
|
|
156
164
|
self.health = Health(self.sdk_configuration)
|
157
165
|
self.organizations = Organizations(self.sdk_configuration)
|
158
166
|
self.users = Users(self.sdk_configuration)
|
167
|
+
self.organizations_usage = OrganizationsUsage(self.sdk_configuration)
|
168
|
+
self.organization_notifications = OrganizationNotifications(
|
169
|
+
self.sdk_configuration
|
170
|
+
)
|
159
171
|
self.namespaces = Namespaces(self.sdk_configuration)
|
160
|
-
self.
|
161
|
-
self.
|
162
|
-
self.ingest_assets = IngestAssets(self.sdk_configuration)
|
163
|
-
self.taxonomy_entities = TaxonomyEntities(self.sdk_configuration)
|
164
|
-
self.taxonomies = Taxonomies(self.sdk_configuration)
|
165
|
-
self.assets = Assets(self.sdk_configuration)
|
172
|
+
self.buckets = Buckets(self.sdk_configuration)
|
173
|
+
self.bucket_objects = BucketObjects(self.sdk_configuration)
|
166
174
|
self.collections = Collections(self.sdk_configuration)
|
175
|
+
self.collection_cache = CollectionCache(self.sdk_configuration)
|
176
|
+
self.collection_documents = CollectionDocuments(self.sdk_configuration)
|
177
|
+
self.features = Features(self.sdk_configuration)
|
178
|
+
self.retrievers = Retrievers(self.sdk_configuration)
|
179
|
+
self.retriever_stages = RetrieverStages(self.sdk_configuration)
|
180
|
+
self.retriever_interactions = RetrieverInteractions(self.sdk_configuration)
|
167
181
|
self.tasks = Tasks(self.sdk_configuration)
|
182
|
+
self.research = Research(self.sdk_configuration)
|
183
|
+
self.taxonomies = Taxonomies(self.sdk_configuration)
|
184
|
+
self.clusters = Clusters(self.sdk_configuration)
|
168
185
|
|
169
186
|
def __enter__(self):
|
170
187
|
return self
|