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
@@ -8,41 +8,44 @@ from mixpeek.utils import get_security_from_env
|
|
8
8
|
from typing import Any, List, Mapping, Optional, Union
|
9
9
|
|
10
10
|
|
11
|
-
class
|
12
|
-
def
|
11
|
+
class Retrievers(BaseSDK):
|
12
|
+
def create(
|
13
13
|
self,
|
14
14
|
*,
|
15
|
-
|
15
|
+
retriever_name: str,
|
16
|
+
input_schema: Union[
|
17
|
+
models.BucketSchemaInput, models.BucketSchemaInputTypedDict
|
18
|
+
],
|
19
|
+
collection_ids: List[str],
|
20
|
+
stages: Union[
|
21
|
+
List[models.StageConfigInput], List[models.StageConfigInputTypedDict]
|
22
|
+
],
|
16
23
|
x_namespace: OptionalNullable[str] = UNSET,
|
17
|
-
|
18
|
-
Union[models.AssetUpdate, models.AssetUpdateTypedDict]
|
19
|
-
] = UNSET,
|
24
|
+
description: OptionalNullable[str] = UNSET,
|
20
25
|
metadata: Optional[
|
21
26
|
Union[
|
22
|
-
models.
|
23
|
-
models.
|
27
|
+
models.CreateRetrieverRequestMetadata,
|
28
|
+
models.CreateRetrieverRequestMetadataTypedDict,
|
24
29
|
]
|
25
30
|
] = None,
|
26
|
-
|
27
|
-
Union[models.
|
31
|
+
cache_config: OptionalNullable[
|
32
|
+
Union[models.RetrieverCacheConfig, models.RetrieverCacheConfigTypedDict]
|
28
33
|
] = UNSET,
|
29
|
-
skip_duplicate: OptionalNullable[bool] = UNSET,
|
30
34
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
31
35
|
server_url: Optional[str] = None,
|
32
36
|
timeout_ms: Optional[int] = None,
|
33
37
|
http_headers: Optional[Mapping[str, str]] = None,
|
34
|
-
) -> models.
|
35
|
-
r"""
|
36
|
-
|
37
|
-
**Requirements:**
|
38
|
-
- Required permissions: write
|
38
|
+
) -> models.RetrieverModel:
|
39
|
+
r"""Create Retriever
|
39
40
|
|
40
|
-
:param
|
41
|
+
:param retriever_name: Name of the retriever
|
42
|
+
:param input_schema: Schema definition for bucket objects
|
43
|
+
:param collection_ids: List of collection IDs to search in
|
44
|
+
:param stages: List of stages to execute in order
|
41
45
|
: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.
|
42
|
-
:param
|
43
|
-
:param metadata:
|
44
|
-
:param
|
45
|
-
:param skip_duplicate: Skips processing when a duplicate hash is found and stores an error by the task_id with the existing asset_id
|
46
|
+
:param description: Description of the retriever
|
47
|
+
:param metadata:
|
48
|
+
:param cache_config: Configuration for retriever-level caching
|
46
49
|
:param retries: Override the default retry configuration for this method
|
47
50
|
:param server_url: Override the default server URL for this method
|
48
51
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
@@ -58,26 +61,28 @@ class IngestAssets(BaseSDK):
|
|
58
61
|
else:
|
59
62
|
base_url = self._get_url(base_url, url_variables)
|
60
63
|
|
61
|
-
request = models.
|
64
|
+
request = models.CreateRetrieverV1RetrieversRetrieversPostRequest(
|
62
65
|
x_namespace=x_namespace,
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
66
|
+
create_retriever_request=models.CreateRetrieverRequest(
|
67
|
+
retriever_name=retriever_name,
|
68
|
+
description=description,
|
69
|
+
input_schema=utils.get_pydantic_model(
|
70
|
+
input_schema, models.BucketSchemaInput
|
67
71
|
),
|
72
|
+
collection_ids=collection_ids,
|
73
|
+
stages=utils.get_pydantic_model(stages, List[models.StageConfigInput]),
|
68
74
|
metadata=utils.get_pydantic_model(
|
69
|
-
metadata, Optional[models.
|
75
|
+
metadata, Optional[models.CreateRetrieverRequestMetadata]
|
70
76
|
),
|
71
|
-
|
72
|
-
|
77
|
+
cache_config=utils.get_pydantic_model(
|
78
|
+
cache_config, OptionalNullable[models.RetrieverCacheConfig]
|
73
79
|
),
|
74
|
-
skip_duplicate=skip_duplicate,
|
75
80
|
),
|
76
81
|
)
|
77
82
|
|
78
83
|
req = self._build_request(
|
79
84
|
method="POST",
|
80
|
-
path="/v1/
|
85
|
+
path="/v1/retrievers/retrievers",
|
81
86
|
base_url=base_url,
|
82
87
|
url_variables=url_variables,
|
83
88
|
request=request,
|
@@ -89,11 +94,11 @@ class IngestAssets(BaseSDK):
|
|
89
94
|
http_headers=http_headers,
|
90
95
|
security=self.sdk_configuration.security,
|
91
96
|
get_serialized_body=lambda: utils.serialize_request_body(
|
92
|
-
request.
|
97
|
+
request.create_retriever_request,
|
93
98
|
False,
|
94
99
|
False,
|
95
100
|
"json",
|
96
|
-
models.
|
101
|
+
models.CreateRetrieverRequest,
|
97
102
|
),
|
98
103
|
timeout_ms=timeout_ms,
|
99
104
|
)
|
@@ -109,7 +114,7 @@ class IngestAssets(BaseSDK):
|
|
109
114
|
http_res = self.do_request(
|
110
115
|
hook_ctx=HookContext(
|
111
116
|
base_url=base_url or "",
|
112
|
-
operation_id="
|
117
|
+
operation_id="create_retriever_v1_retrievers_retrievers_post",
|
113
118
|
oauth2_scopes=[],
|
114
119
|
security_source=get_security_from_env(
|
115
120
|
self.sdk_configuration.security, models.Security
|
@@ -122,7 +127,7 @@ class IngestAssets(BaseSDK):
|
|
122
127
|
|
123
128
|
response_data: Any = None
|
124
129
|
if utils.match_response(http_res, "200", "application/json"):
|
125
|
-
return utils.unmarshal_json(http_res.text, models.
|
130
|
+
return utils.unmarshal_json(http_res.text, models.RetrieverModel)
|
126
131
|
if utils.match_response(
|
127
132
|
http_res, ["400", "401", "403", "404"], "application/json"
|
128
133
|
):
|
@@ -160,40 +165,43 @@ class IngestAssets(BaseSDK):
|
|
160
165
|
http_res,
|
161
166
|
)
|
162
167
|
|
163
|
-
async def
|
168
|
+
async def create_async(
|
164
169
|
self,
|
165
170
|
*,
|
166
|
-
|
171
|
+
retriever_name: str,
|
172
|
+
input_schema: Union[
|
173
|
+
models.BucketSchemaInput, models.BucketSchemaInputTypedDict
|
174
|
+
],
|
175
|
+
collection_ids: List[str],
|
176
|
+
stages: Union[
|
177
|
+
List[models.StageConfigInput], List[models.StageConfigInputTypedDict]
|
178
|
+
],
|
167
179
|
x_namespace: OptionalNullable[str] = UNSET,
|
168
|
-
|
169
|
-
Union[models.AssetUpdate, models.AssetUpdateTypedDict]
|
170
|
-
] = UNSET,
|
180
|
+
description: OptionalNullable[str] = UNSET,
|
171
181
|
metadata: Optional[
|
172
182
|
Union[
|
173
|
-
models.
|
174
|
-
models.
|
183
|
+
models.CreateRetrieverRequestMetadata,
|
184
|
+
models.CreateRetrieverRequestMetadataTypedDict,
|
175
185
|
]
|
176
186
|
] = None,
|
177
|
-
|
178
|
-
Union[models.
|
187
|
+
cache_config: OptionalNullable[
|
188
|
+
Union[models.RetrieverCacheConfig, models.RetrieverCacheConfigTypedDict]
|
179
189
|
] = UNSET,
|
180
|
-
skip_duplicate: OptionalNullable[bool] = UNSET,
|
181
190
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
182
191
|
server_url: Optional[str] = None,
|
183
192
|
timeout_ms: Optional[int] = None,
|
184
193
|
http_headers: Optional[Mapping[str, str]] = None,
|
185
|
-
) -> models.
|
186
|
-
r"""
|
194
|
+
) -> models.RetrieverModel:
|
195
|
+
r"""Create Retriever
|
187
196
|
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
:param
|
197
|
+
:param retriever_name: Name of the retriever
|
198
|
+
:param input_schema: Schema definition for bucket objects
|
199
|
+
:param collection_ids: List of collection IDs to search in
|
200
|
+
:param stages: List of stages to execute in order
|
192
201
|
: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.
|
193
|
-
:param
|
194
|
-
:param metadata:
|
195
|
-
:param
|
196
|
-
:param skip_duplicate: Skips processing when a duplicate hash is found and stores an error by the task_id with the existing asset_id
|
202
|
+
:param description: Description of the retriever
|
203
|
+
:param metadata:
|
204
|
+
:param cache_config: Configuration for retriever-level caching
|
197
205
|
:param retries: Override the default retry configuration for this method
|
198
206
|
:param server_url: Override the default server URL for this method
|
199
207
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
@@ -209,26 +217,28 @@ class IngestAssets(BaseSDK):
|
|
209
217
|
else:
|
210
218
|
base_url = self._get_url(base_url, url_variables)
|
211
219
|
|
212
|
-
request = models.
|
220
|
+
request = models.CreateRetrieverV1RetrieversRetrieversPostRequest(
|
213
221
|
x_namespace=x_namespace,
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
222
|
+
create_retriever_request=models.CreateRetrieverRequest(
|
223
|
+
retriever_name=retriever_name,
|
224
|
+
description=description,
|
225
|
+
input_schema=utils.get_pydantic_model(
|
226
|
+
input_schema, models.BucketSchemaInput
|
218
227
|
),
|
228
|
+
collection_ids=collection_ids,
|
229
|
+
stages=utils.get_pydantic_model(stages, List[models.StageConfigInput]),
|
219
230
|
metadata=utils.get_pydantic_model(
|
220
|
-
metadata, Optional[models.
|
231
|
+
metadata, Optional[models.CreateRetrieverRequestMetadata]
|
221
232
|
),
|
222
|
-
|
223
|
-
|
233
|
+
cache_config=utils.get_pydantic_model(
|
234
|
+
cache_config, OptionalNullable[models.RetrieverCacheConfig]
|
224
235
|
),
|
225
|
-
skip_duplicate=skip_duplicate,
|
226
236
|
),
|
227
237
|
)
|
228
238
|
|
229
239
|
req = self._build_request_async(
|
230
240
|
method="POST",
|
231
|
-
path="/v1/
|
241
|
+
path="/v1/retrievers/retrievers",
|
232
242
|
base_url=base_url,
|
233
243
|
url_variables=url_variables,
|
234
244
|
request=request,
|
@@ -240,11 +250,11 @@ class IngestAssets(BaseSDK):
|
|
240
250
|
http_headers=http_headers,
|
241
251
|
security=self.sdk_configuration.security,
|
242
252
|
get_serialized_body=lambda: utils.serialize_request_body(
|
243
|
-
request.
|
253
|
+
request.create_retriever_request,
|
244
254
|
False,
|
245
255
|
False,
|
246
256
|
"json",
|
247
|
-
models.
|
257
|
+
models.CreateRetrieverRequest,
|
248
258
|
),
|
249
259
|
timeout_ms=timeout_ms,
|
250
260
|
)
|
@@ -260,7 +270,7 @@ class IngestAssets(BaseSDK):
|
|
260
270
|
http_res = await self.do_request_async(
|
261
271
|
hook_ctx=HookContext(
|
262
272
|
base_url=base_url or "",
|
263
|
-
operation_id="
|
273
|
+
operation_id="create_retriever_v1_retrievers_retrievers_post",
|
264
274
|
oauth2_scopes=[],
|
265
275
|
security_source=get_security_from_env(
|
266
276
|
self.sdk_configuration.security, models.Security
|
@@ -273,7 +283,7 @@ class IngestAssets(BaseSDK):
|
|
273
283
|
|
274
284
|
response_data: Any = None
|
275
285
|
if utils.match_response(http_res, "200", "application/json"):
|
276
|
-
return utils.unmarshal_json(http_res.text, models.
|
286
|
+
return utils.unmarshal_json(http_res.text, models.RetrieverModel)
|
277
287
|
if utils.match_response(
|
278
288
|
http_res, ["400", "401", "403", "404"], "application/json"
|
279
289
|
):
|
@@ -311,42 +321,20 @@ class IngestAssets(BaseSDK):
|
|
311
321
|
http_res,
|
312
322
|
)
|
313
323
|
|
314
|
-
def
|
324
|
+
def get(
|
315
325
|
self,
|
316
326
|
*,
|
317
|
-
|
318
|
-
collection: str,
|
327
|
+
retriever_id: str,
|
319
328
|
x_namespace: OptionalNullable[str] = UNSET,
|
320
|
-
asset_update: OptionalNullable[
|
321
|
-
Union[models.AssetUpdate, models.AssetUpdateTypedDict]
|
322
|
-
] = UNSET,
|
323
|
-
metadata: Optional[
|
324
|
-
Union[
|
325
|
-
models.ProcessVideoURLInputMetadata,
|
326
|
-
models.ProcessVideoURLInputMetadataTypedDict,
|
327
|
-
]
|
328
|
-
] = None,
|
329
|
-
skip_duplicate: OptionalNullable[bool] = UNSET,
|
330
|
-
feature_extractors: OptionalNullable[
|
331
|
-
Union[List[models.VideoSettings], List[models.VideoSettingsTypedDict]]
|
332
|
-
] = UNSET,
|
333
329
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
334
330
|
server_url: Optional[str] = None,
|
335
331
|
timeout_ms: Optional[int] = None,
|
336
332
|
http_headers: Optional[Mapping[str, str]] = None,
|
337
|
-
) -> models.
|
338
|
-
r"""
|
339
|
-
|
340
|
-
**Requirements:**
|
341
|
-
- Required permissions: write
|
333
|
+
) -> models.RetrieverModel:
|
334
|
+
r"""Get Retriever
|
342
335
|
|
343
|
-
:param
|
344
|
-
:param collection: Unique identifier for the collection where the processed asset will be stored, can be the collection name or collection ID. If neither exist, the collection will be created.
|
336
|
+
:param retriever_id:
|
345
337
|
: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.
|
346
|
-
:param asset_update: Controls how processing results are stored - either creating a new asset or updating an existing one.
|
347
|
-
:param metadata: Additional metadata associated with the asset. Can include any key-value pairs relevant to the asset.
|
348
|
-
:param skip_duplicate: Makes feature extraction idempotent. When True and a duplicate file hash is found, copies features from the existing asset instead of reprocessing. This allows the same file to be used multiple times with different metadata while avoiding redundant processing.
|
349
|
-
:param feature_extractors: Settings for video processing. Only applicable if the URL points to a video file.
|
350
338
|
:param retries: Override the default retry configuration for this method
|
351
339
|
:param server_url: Override the default server URL for this method
|
352
340
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
@@ -362,44 +350,24 @@ class IngestAssets(BaseSDK):
|
|
362
350
|
else:
|
363
351
|
base_url = self._get_url(base_url, url_variables)
|
364
352
|
|
365
|
-
request = models.
|
353
|
+
request = models.GetRetrieverV1RetrieversRetrieversRetrieverIDGetRequest(
|
354
|
+
retriever_id=retriever_id,
|
366
355
|
x_namespace=x_namespace,
|
367
|
-
process_video_url_input=models.ProcessVideoURLInput(
|
368
|
-
url=url,
|
369
|
-
collection=collection,
|
370
|
-
asset_update=utils.get_pydantic_model(
|
371
|
-
asset_update, OptionalNullable[models.AssetUpdate]
|
372
|
-
),
|
373
|
-
metadata=utils.get_pydantic_model(
|
374
|
-
metadata, Optional[models.ProcessVideoURLInputMetadata]
|
375
|
-
),
|
376
|
-
skip_duplicate=skip_duplicate,
|
377
|
-
feature_extractors=utils.get_pydantic_model(
|
378
|
-
feature_extractors, OptionalNullable[List[models.VideoSettings]]
|
379
|
-
),
|
380
|
-
),
|
381
356
|
)
|
382
357
|
|
383
358
|
req = self._build_request(
|
384
|
-
method="
|
385
|
-
path="/v1/
|
359
|
+
method="GET",
|
360
|
+
path="/v1/retrievers/retrievers/{retriever_id}",
|
386
361
|
base_url=base_url,
|
387
362
|
url_variables=url_variables,
|
388
363
|
request=request,
|
389
|
-
request_body_required=
|
390
|
-
request_has_path_params=
|
364
|
+
request_body_required=False,
|
365
|
+
request_has_path_params=True,
|
391
366
|
request_has_query_params=True,
|
392
367
|
user_agent_header="user-agent",
|
393
368
|
accept_header_value="application/json",
|
394
369
|
http_headers=http_headers,
|
395
370
|
security=self.sdk_configuration.security,
|
396
|
-
get_serialized_body=lambda: utils.serialize_request_body(
|
397
|
-
request.process_video_url_input,
|
398
|
-
False,
|
399
|
-
False,
|
400
|
-
"json",
|
401
|
-
models.ProcessVideoURLInput,
|
402
|
-
),
|
403
371
|
timeout_ms=timeout_ms,
|
404
372
|
)
|
405
373
|
|
@@ -414,7 +382,7 @@ class IngestAssets(BaseSDK):
|
|
414
382
|
http_res = self.do_request(
|
415
383
|
hook_ctx=HookContext(
|
416
384
|
base_url=base_url or "",
|
417
|
-
operation_id="
|
385
|
+
operation_id="get_retriever_v1_retrievers_retrievers__retriever_id__get",
|
418
386
|
oauth2_scopes=[],
|
419
387
|
security_source=get_security_from_env(
|
420
388
|
self.sdk_configuration.security, models.Security
|
@@ -427,7 +395,7 @@ class IngestAssets(BaseSDK):
|
|
427
395
|
|
428
396
|
response_data: Any = None
|
429
397
|
if utils.match_response(http_res, "200", "application/json"):
|
430
|
-
return utils.unmarshal_json(http_res.text, models.
|
398
|
+
return utils.unmarshal_json(http_res.text, models.RetrieverModel)
|
431
399
|
if utils.match_response(
|
432
400
|
http_res, ["400", "401", "403", "404"], "application/json"
|
433
401
|
):
|
@@ -465,42 +433,20 @@ class IngestAssets(BaseSDK):
|
|
465
433
|
http_res,
|
466
434
|
)
|
467
435
|
|
468
|
-
async def
|
436
|
+
async def get_async(
|
469
437
|
self,
|
470
438
|
*,
|
471
|
-
|
472
|
-
collection: str,
|
439
|
+
retriever_id: str,
|
473
440
|
x_namespace: OptionalNullable[str] = UNSET,
|
474
|
-
asset_update: OptionalNullable[
|
475
|
-
Union[models.AssetUpdate, models.AssetUpdateTypedDict]
|
476
|
-
] = UNSET,
|
477
|
-
metadata: Optional[
|
478
|
-
Union[
|
479
|
-
models.ProcessVideoURLInputMetadata,
|
480
|
-
models.ProcessVideoURLInputMetadataTypedDict,
|
481
|
-
]
|
482
|
-
] = None,
|
483
|
-
skip_duplicate: OptionalNullable[bool] = UNSET,
|
484
|
-
feature_extractors: OptionalNullable[
|
485
|
-
Union[List[models.VideoSettings], List[models.VideoSettingsTypedDict]]
|
486
|
-
] = UNSET,
|
487
441
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
488
442
|
server_url: Optional[str] = None,
|
489
443
|
timeout_ms: Optional[int] = None,
|
490
444
|
http_headers: Optional[Mapping[str, str]] = None,
|
491
|
-
) -> models.
|
492
|
-
r"""
|
445
|
+
) -> models.RetrieverModel:
|
446
|
+
r"""Get Retriever
|
493
447
|
|
494
|
-
|
495
|
-
- Required permissions: write
|
496
|
-
|
497
|
-
:param url: The URL of the asset to be processed. Must be a valid HTTP or HTTPS URL.
|
498
|
-
:param collection: Unique identifier for the collection where the processed asset will be stored, can be the collection name or collection ID. If neither exist, the collection will be created.
|
448
|
+
:param retriever_id:
|
499
449
|
: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.
|
500
|
-
:param asset_update: Controls how processing results are stored - either creating a new asset or updating an existing one.
|
501
|
-
:param metadata: Additional metadata associated with the asset. Can include any key-value pairs relevant to the asset.
|
502
|
-
:param skip_duplicate: Makes feature extraction idempotent. When True and a duplicate file hash is found, copies features from the existing asset instead of reprocessing. This allows the same file to be used multiple times with different metadata while avoiding redundant processing.
|
503
|
-
:param feature_extractors: Settings for video processing. Only applicable if the URL points to a video file.
|
504
450
|
:param retries: Override the default retry configuration for this method
|
505
451
|
:param server_url: Override the default server URL for this method
|
506
452
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
@@ -516,44 +462,24 @@ class IngestAssets(BaseSDK):
|
|
516
462
|
else:
|
517
463
|
base_url = self._get_url(base_url, url_variables)
|
518
464
|
|
519
|
-
request = models.
|
465
|
+
request = models.GetRetrieverV1RetrieversRetrieversRetrieverIDGetRequest(
|
466
|
+
retriever_id=retriever_id,
|
520
467
|
x_namespace=x_namespace,
|
521
|
-
process_video_url_input=models.ProcessVideoURLInput(
|
522
|
-
url=url,
|
523
|
-
collection=collection,
|
524
|
-
asset_update=utils.get_pydantic_model(
|
525
|
-
asset_update, OptionalNullable[models.AssetUpdate]
|
526
|
-
),
|
527
|
-
metadata=utils.get_pydantic_model(
|
528
|
-
metadata, Optional[models.ProcessVideoURLInputMetadata]
|
529
|
-
),
|
530
|
-
skip_duplicate=skip_duplicate,
|
531
|
-
feature_extractors=utils.get_pydantic_model(
|
532
|
-
feature_extractors, OptionalNullable[List[models.VideoSettings]]
|
533
|
-
),
|
534
|
-
),
|
535
468
|
)
|
536
469
|
|
537
470
|
req = self._build_request_async(
|
538
|
-
method="
|
539
|
-
path="/v1/
|
471
|
+
method="GET",
|
472
|
+
path="/v1/retrievers/retrievers/{retriever_id}",
|
540
473
|
base_url=base_url,
|
541
474
|
url_variables=url_variables,
|
542
475
|
request=request,
|
543
|
-
request_body_required=
|
544
|
-
request_has_path_params=
|
476
|
+
request_body_required=False,
|
477
|
+
request_has_path_params=True,
|
545
478
|
request_has_query_params=True,
|
546
479
|
user_agent_header="user-agent",
|
547
480
|
accept_header_value="application/json",
|
548
481
|
http_headers=http_headers,
|
549
482
|
security=self.sdk_configuration.security,
|
550
|
-
get_serialized_body=lambda: utils.serialize_request_body(
|
551
|
-
request.process_video_url_input,
|
552
|
-
False,
|
553
|
-
False,
|
554
|
-
"json",
|
555
|
-
models.ProcessVideoURLInput,
|
556
|
-
),
|
557
483
|
timeout_ms=timeout_ms,
|
558
484
|
)
|
559
485
|
|
@@ -568,7 +494,7 @@ class IngestAssets(BaseSDK):
|
|
568
494
|
http_res = await self.do_request_async(
|
569
495
|
hook_ctx=HookContext(
|
570
496
|
base_url=base_url or "",
|
571
|
-
operation_id="
|
497
|
+
operation_id="get_retriever_v1_retrievers_retrievers__retriever_id__get",
|
572
498
|
oauth2_scopes=[],
|
573
499
|
security_source=get_security_from_env(
|
574
500
|
self.sdk_configuration.security, models.Security
|
@@ -581,7 +507,7 @@ class IngestAssets(BaseSDK):
|
|
581
507
|
|
582
508
|
response_data: Any = None
|
583
509
|
if utils.match_response(http_res, "200", "application/json"):
|
584
|
-
return utils.unmarshal_json(http_res.text, models.
|
510
|
+
return utils.unmarshal_json(http_res.text, models.RetrieverModel)
|
585
511
|
if utils.match_response(
|
586
512
|
http_res, ["400", "401", "403", "404"], "application/json"
|
587
513
|
):
|
@@ -619,42 +545,43 @@ class IngestAssets(BaseSDK):
|
|
619
545
|
http_res,
|
620
546
|
)
|
621
547
|
|
622
|
-
def
|
548
|
+
def execute(
|
623
549
|
self,
|
624
550
|
*,
|
625
|
-
|
626
|
-
|
551
|
+
retriever_id: str,
|
552
|
+
inputs: Union[
|
553
|
+
models.RetrieverQueryRequestInputs,
|
554
|
+
models.RetrieverQueryRequestInputsTypedDict,
|
555
|
+
],
|
627
556
|
x_namespace: OptionalNullable[str] = UNSET,
|
628
|
-
|
629
|
-
Union[models.
|
557
|
+
filters: OptionalNullable[
|
558
|
+
Union[models.LogicalOperatorInput, models.LogicalOperatorInputTypedDict]
|
630
559
|
] = UNSET,
|
631
|
-
|
632
|
-
Union[
|
633
|
-
models.ProcessImageURLInputMetadata,
|
634
|
-
models.ProcessImageURLInputMetadataTypedDict,
|
635
|
-
]
|
636
|
-
] = None,
|
637
|
-
skip_duplicate: OptionalNullable[bool] = UNSET,
|
638
|
-
feature_extractors: OptionalNullable[
|
639
|
-
Union[models.ImageSettings, models.ImageSettingsTypedDict]
|
560
|
+
sorts: OptionalNullable[
|
561
|
+
Union[List[models.SortOption], List[models.SortOptionTypedDict]]
|
640
562
|
] = UNSET,
|
563
|
+
limit: Optional[int] = 10,
|
564
|
+
offset: Optional[int] = 0,
|
565
|
+
select: OptionalNullable[List[str]] = UNSET,
|
566
|
+
session_id: OptionalNullable[str] = UNSET,
|
567
|
+
return_urls: Optional[bool] = False,
|
641
568
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
642
569
|
server_url: Optional[str] = None,
|
643
570
|
timeout_ms: Optional[int] = None,
|
644
571
|
http_headers: Optional[Mapping[str, str]] = None,
|
645
|
-
) -> models.
|
646
|
-
r"""
|
647
|
-
|
648
|
-
**Requirements:**
|
649
|
-
- Required permissions: write
|
572
|
+
) -> models.RetrieverResponse:
|
573
|
+
r"""Execute Retriever
|
650
574
|
|
651
|
-
:param
|
652
|
-
:param
|
575
|
+
:param retriever_id:
|
576
|
+
:param inputs: Input values for the retriever query. These map to the required inputs defined in the retriever's first stage.
|
653
577
|
: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.
|
654
|
-
:param
|
655
|
-
:param
|
656
|
-
:param
|
657
|
-
:param
|
578
|
+
:param filters: Logical operations for filtering results. Can include AND, OR, NOT conditions with field comparisons.
|
579
|
+
:param sorts: Controls the ordering of results. Can sort by score (default) or any other document field. This sorts the results from the last stage.
|
580
|
+
:param limit: Maximum number of results to return. Overrides the default pagination limit in the retriever definition.
|
581
|
+
:param offset: Number of results to skip. Use with limit for pagination. For large offsets, consider using session_id for cursor-based pagination.
|
582
|
+
:param select: Specific fields to include in the response. If not specified, returns all fields.
|
583
|
+
:param session_id: Session identifier for interaction tracking.
|
584
|
+
:param return_urls: When true, generates pre-signed URLs for any media assets in the results. May increase response time slightly.
|
658
585
|
:param retries: Override the default retry configuration for this method
|
659
586
|
:param server_url: Override the default server URL for this method
|
660
587
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
@@ -670,43 +597,48 @@ class IngestAssets(BaseSDK):
|
|
670
597
|
else:
|
671
598
|
base_url = self._get_url(base_url, url_variables)
|
672
599
|
|
673
|
-
request =
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
600
|
+
request = (
|
601
|
+
models.ExecuteRetrieverV1RetrieversRetrieversRetrieverIDExecutePostRequest(
|
602
|
+
retriever_id=retriever_id,
|
603
|
+
x_namespace=x_namespace,
|
604
|
+
retriever_query_request=models.RetrieverQueryRequest(
|
605
|
+
inputs=utils.get_pydantic_model(
|
606
|
+
inputs, models.RetrieverQueryRequestInputs
|
607
|
+
),
|
608
|
+
filters=utils.get_pydantic_model(
|
609
|
+
filters, OptionalNullable[models.LogicalOperatorInput]
|
610
|
+
),
|
611
|
+
sorts=utils.get_pydantic_model(
|
612
|
+
sorts, OptionalNullable[List[models.SortOption]]
|
613
|
+
),
|
614
|
+
limit=limit,
|
615
|
+
offset=offset,
|
616
|
+
select=select,
|
617
|
+
session_id=session_id,
|
618
|
+
return_urls=return_urls,
|
687
619
|
),
|
688
|
-
)
|
620
|
+
)
|
689
621
|
)
|
690
622
|
|
691
623
|
req = self._build_request(
|
692
624
|
method="POST",
|
693
|
-
path="/v1/
|
625
|
+
path="/v1/retrievers/retrievers/{retriever_id}/execute",
|
694
626
|
base_url=base_url,
|
695
627
|
url_variables=url_variables,
|
696
628
|
request=request,
|
697
629
|
request_body_required=True,
|
698
|
-
request_has_path_params=
|
630
|
+
request_has_path_params=True,
|
699
631
|
request_has_query_params=True,
|
700
632
|
user_agent_header="user-agent",
|
701
633
|
accept_header_value="application/json",
|
702
634
|
http_headers=http_headers,
|
703
635
|
security=self.sdk_configuration.security,
|
704
636
|
get_serialized_body=lambda: utils.serialize_request_body(
|
705
|
-
request.
|
637
|
+
request.retriever_query_request,
|
706
638
|
False,
|
707
639
|
False,
|
708
640
|
"json",
|
709
|
-
models.
|
641
|
+
models.RetrieverQueryRequest,
|
710
642
|
),
|
711
643
|
timeout_ms=timeout_ms,
|
712
644
|
)
|
@@ -722,7 +654,7 @@ class IngestAssets(BaseSDK):
|
|
722
654
|
http_res = self.do_request(
|
723
655
|
hook_ctx=HookContext(
|
724
656
|
base_url=base_url or "",
|
725
|
-
operation_id="
|
657
|
+
operation_id="execute_retriever_v1_retrievers_retrievers__retriever_id__execute_post",
|
726
658
|
oauth2_scopes=[],
|
727
659
|
security_source=get_security_from_env(
|
728
660
|
self.sdk_configuration.security, models.Security
|
@@ -735,7 +667,7 @@ class IngestAssets(BaseSDK):
|
|
735
667
|
|
736
668
|
response_data: Any = None
|
737
669
|
if utils.match_response(http_res, "200", "application/json"):
|
738
|
-
return utils.unmarshal_json(http_res.text, models.
|
670
|
+
return utils.unmarshal_json(http_res.text, models.RetrieverResponse)
|
739
671
|
if utils.match_response(
|
740
672
|
http_res, ["400", "401", "403", "404"], "application/json"
|
741
673
|
):
|
@@ -773,42 +705,43 @@ class IngestAssets(BaseSDK):
|
|
773
705
|
http_res,
|
774
706
|
)
|
775
707
|
|
776
|
-
async def
|
708
|
+
async def execute_async(
|
777
709
|
self,
|
778
710
|
*,
|
779
|
-
|
780
|
-
|
711
|
+
retriever_id: str,
|
712
|
+
inputs: Union[
|
713
|
+
models.RetrieverQueryRequestInputs,
|
714
|
+
models.RetrieverQueryRequestInputsTypedDict,
|
715
|
+
],
|
781
716
|
x_namespace: OptionalNullable[str] = UNSET,
|
782
|
-
|
783
|
-
Union[models.
|
717
|
+
filters: OptionalNullable[
|
718
|
+
Union[models.LogicalOperatorInput, models.LogicalOperatorInputTypedDict]
|
784
719
|
] = UNSET,
|
785
|
-
|
786
|
-
Union[
|
787
|
-
models.ProcessImageURLInputMetadata,
|
788
|
-
models.ProcessImageURLInputMetadataTypedDict,
|
789
|
-
]
|
790
|
-
] = None,
|
791
|
-
skip_duplicate: OptionalNullable[bool] = UNSET,
|
792
|
-
feature_extractors: OptionalNullable[
|
793
|
-
Union[models.ImageSettings, models.ImageSettingsTypedDict]
|
720
|
+
sorts: OptionalNullable[
|
721
|
+
Union[List[models.SortOption], List[models.SortOptionTypedDict]]
|
794
722
|
] = UNSET,
|
723
|
+
limit: Optional[int] = 10,
|
724
|
+
offset: Optional[int] = 0,
|
725
|
+
select: OptionalNullable[List[str]] = UNSET,
|
726
|
+
session_id: OptionalNullable[str] = UNSET,
|
727
|
+
return_urls: Optional[bool] = False,
|
795
728
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
796
729
|
server_url: Optional[str] = None,
|
797
730
|
timeout_ms: Optional[int] = None,
|
798
731
|
http_headers: Optional[Mapping[str, str]] = None,
|
799
|
-
) -> models.
|
800
|
-
r"""
|
732
|
+
) -> models.RetrieverResponse:
|
733
|
+
r"""Execute Retriever
|
801
734
|
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
:param url: The URL of the asset to be processed. Must be a valid HTTP or HTTPS URL.
|
806
|
-
:param collection: Unique identifier for the collection where the processed asset will be stored, can be the collection name or collection ID. If neither exist, the collection will be created.
|
735
|
+
:param retriever_id:
|
736
|
+
:param inputs: Input values for the retriever query. These map to the required inputs defined in the retriever's first stage.
|
807
737
|
: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.
|
808
|
-
:param
|
809
|
-
:param
|
810
|
-
:param
|
811
|
-
:param
|
738
|
+
:param filters: Logical operations for filtering results. Can include AND, OR, NOT conditions with field comparisons.
|
739
|
+
:param sorts: Controls the ordering of results. Can sort by score (default) or any other document field. This sorts the results from the last stage.
|
740
|
+
:param limit: Maximum number of results to return. Overrides the default pagination limit in the retriever definition.
|
741
|
+
:param offset: Number of results to skip. Use with limit for pagination. For large offsets, consider using session_id for cursor-based pagination.
|
742
|
+
:param select: Specific fields to include in the response. If not specified, returns all fields.
|
743
|
+
:param session_id: Session identifier for interaction tracking.
|
744
|
+
:param return_urls: When true, generates pre-signed URLs for any media assets in the results. May increase response time slightly.
|
812
745
|
:param retries: Override the default retry configuration for this method
|
813
746
|
:param server_url: Override the default server URL for this method
|
814
747
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
@@ -824,43 +757,48 @@ class IngestAssets(BaseSDK):
|
|
824
757
|
else:
|
825
758
|
base_url = self._get_url(base_url, url_variables)
|
826
759
|
|
827
|
-
request =
|
828
|
-
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
|
760
|
+
request = (
|
761
|
+
models.ExecuteRetrieverV1RetrieversRetrieversRetrieverIDExecutePostRequest(
|
762
|
+
retriever_id=retriever_id,
|
763
|
+
x_namespace=x_namespace,
|
764
|
+
retriever_query_request=models.RetrieverQueryRequest(
|
765
|
+
inputs=utils.get_pydantic_model(
|
766
|
+
inputs, models.RetrieverQueryRequestInputs
|
767
|
+
),
|
768
|
+
filters=utils.get_pydantic_model(
|
769
|
+
filters, OptionalNullable[models.LogicalOperatorInput]
|
770
|
+
),
|
771
|
+
sorts=utils.get_pydantic_model(
|
772
|
+
sorts, OptionalNullable[List[models.SortOption]]
|
773
|
+
),
|
774
|
+
limit=limit,
|
775
|
+
offset=offset,
|
776
|
+
select=select,
|
777
|
+
session_id=session_id,
|
778
|
+
return_urls=return_urls,
|
837
779
|
),
|
838
|
-
|
839
|
-
feature_extractors=utils.get_pydantic_model(
|
840
|
-
feature_extractors, OptionalNullable[models.ImageSettings]
|
841
|
-
),
|
842
|
-
),
|
780
|
+
)
|
843
781
|
)
|
844
782
|
|
845
783
|
req = self._build_request_async(
|
846
784
|
method="POST",
|
847
|
-
path="/v1/
|
785
|
+
path="/v1/retrievers/retrievers/{retriever_id}/execute",
|
848
786
|
base_url=base_url,
|
849
787
|
url_variables=url_variables,
|
850
788
|
request=request,
|
851
789
|
request_body_required=True,
|
852
|
-
request_has_path_params=
|
790
|
+
request_has_path_params=True,
|
853
791
|
request_has_query_params=True,
|
854
792
|
user_agent_header="user-agent",
|
855
793
|
accept_header_value="application/json",
|
856
794
|
http_headers=http_headers,
|
857
795
|
security=self.sdk_configuration.security,
|
858
796
|
get_serialized_body=lambda: utils.serialize_request_body(
|
859
|
-
request.
|
797
|
+
request.retriever_query_request,
|
860
798
|
False,
|
861
799
|
False,
|
862
800
|
"json",
|
863
|
-
models.
|
801
|
+
models.RetrieverQueryRequest,
|
864
802
|
),
|
865
803
|
timeout_ms=timeout_ms,
|
866
804
|
)
|
@@ -876,7 +814,7 @@ class IngestAssets(BaseSDK):
|
|
876
814
|
http_res = await self.do_request_async(
|
877
815
|
hook_ctx=HookContext(
|
878
816
|
base_url=base_url or "",
|
879
|
-
operation_id="
|
817
|
+
operation_id="execute_retriever_v1_retrievers_retrievers__retriever_id__execute_post",
|
880
818
|
oauth2_scopes=[],
|
881
819
|
security_source=get_security_from_env(
|
882
820
|
self.sdk_configuration.security, models.Security
|
@@ -889,7 +827,7 @@ class IngestAssets(BaseSDK):
|
|
889
827
|
|
890
828
|
response_data: Any = None
|
891
829
|
if utils.match_response(http_res, "200", "application/json"):
|
892
|
-
return utils.unmarshal_json(http_res.text, models.
|
830
|
+
return utils.unmarshal_json(http_res.text, models.RetrieverResponse)
|
893
831
|
if utils.match_response(
|
894
832
|
http_res, ["400", "401", "403", "404"], "application/json"
|
895
833
|
):
|