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.
Files changed (228) hide show
  1. mixpeek/_version.py +3 -3
  2. mixpeek/{assets.py → bucketobjects.py} +309 -793
  3. mixpeek/buckets.py +1292 -0
  4. mixpeek/clusters.py +306 -0
  5. mixpeek/collectioncache.py +820 -0
  6. mixpeek/{taxonomyentities.py → collectiondocuments.py} +305 -559
  7. mixpeek/collections.py +120 -994
  8. mixpeek/features.py +45 -991
  9. mixpeek/models/__init__.py +625 -570
  10. mixpeek/models/aggregationtype.py +13 -0
  11. mixpeek/models/apikeyupdate.py +1 -1
  12. mixpeek/models/attributebasedconfig.py +21 -0
  13. mixpeek/models/automaticnaming.py +29 -0
  14. mixpeek/models/basicfeatureextractor.py +35 -0
  15. mixpeek/models/{classify_features_v1_entities_taxonomies_taxonomy_classify_postop.py → batch_delete_documents_v1_collections_collection_identifier_documents_batch_deleteop.py} +17 -15
  16. mixpeek/models/{update_collection_v1_collections_collection_putop.py → batch_update_documents_v1_collections_collection_identifier_documents_batch_putop.py} +29 -19
  17. mixpeek/models/blobdetails.py +72 -0
  18. mixpeek/models/blobmodel.py +107 -0
  19. mixpeek/models/bucketcreaterequest.py +75 -0
  20. mixpeek/models/bucketresponse.py +90 -0
  21. mixpeek/models/bucketschema_input.py +37 -0
  22. mixpeek/models/bucketschema_output.py +37 -0
  23. mixpeek/models/{featureresponse.py → bucketschemafield_input.py} +45 -18
  24. mixpeek/models/bucketschemafield_output.py +101 -0
  25. mixpeek/models/bucketschemafieldtype.py +29 -0
  26. mixpeek/models/bucketupdaterequest.py +68 -0
  27. mixpeek/models/cachestats.py +40 -0
  28. mixpeek/models/{list_collections_v1_collections_getop.py → cleanup_cache_v1_collections_cache_cleanup_postop.py} +23 -12
  29. mixpeek/models/{inputtype.py → clusteringmethod.py} +3 -5
  30. mixpeek/models/clustertype.py +9 -0
  31. mixpeek/models/collectioncacheconfig_input.py +92 -0
  32. mixpeek/models/collectioncacheconfig_output.py +92 -0
  33. mixpeek/models/collectionconfig.py +32 -0
  34. mixpeek/models/collectionmodel.py +79 -8
  35. mixpeek/models/{create_taxonomy_v1_entities_taxonomies_postop.py → create_bucket_v1_buckets_create_postop.py} +7 -7
  36. mixpeek/models/{search_assets_v1_assets_search_postop.py → create_cluster_v1_clusters_postop.py} +7 -7
  37. mixpeek/models/{create_collection_v1_collections_postop.py → create_collection_v1_collections_create_postop.py} +3 -3
  38. mixpeek/models/{ingest_video_url_v1_ingest_videos_url_postop.py → create_interaction_v1_retrievers_interactions_postop.py} +7 -7
  39. mixpeek/models/{partial_asset_update_v1_assets_asset_id_patchop.py → create_object_v1_buckets_bucket_identifier_objects_create_postop.py} +11 -9
  40. mixpeek/models/{ingest_text_v1_ingest_text_postop.py → create_retriever_v1_retrievers_retrievers_postop.py} +10 -7
  41. mixpeek/models/{ingest_image_url_v1_ingest_images_url_postop.py → create_taxonomy_v1_taxonomies_postop.py} +7 -7
  42. mixpeek/models/createblobrequest.py +80 -0
  43. mixpeek/models/createclusterrequest.py +74 -0
  44. mixpeek/models/createcollectionrequest.py +72 -3
  45. mixpeek/models/createnamespacerequest.py +14 -8
  46. mixpeek/models/createobjectrequest.py +75 -0
  47. mixpeek/models/createretrieverrequest.py +90 -0
  48. mixpeek/models/{taxonomyupdate.py → createtaxonomyrequest.py} +15 -13
  49. mixpeek/models/{delete_asset_v1_assets_asset_id_deleteop.py → delete_bucket_v1_buckets_bucket_identifier_deleteop.py} +5 -5
  50. 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
  51. mixpeek/models/{get_taxonomy_v1_entities_taxonomies_taxonomy_getop.py → delete_interaction_v1_retrievers_interactions_interaction_id_deleteop.py} +7 -7
  52. mixpeek/models/delete_object_v1_buckets_bucket_identifier_objects_object_identifier_deleteop.py +70 -0
  53. mixpeek/models/{featureextractionembeddingrequest.py → documenthandlingconfig.py} +12 -15
  54. mixpeek/models/documentinputhandling.py +11 -0
  55. mixpeek/models/{jsontextoutputsettings.py → documentlistresponse.py} +15 -14
  56. mixpeek/models/documentoutputhandling.py +10 -0
  57. mixpeek/models/documentoutputtype.py +11 -0
  58. mixpeek/models/documentresponse.py +87 -0
  59. mixpeek/models/{nodeupdate.py → documentupdate.py} +22 -13
  60. mixpeek/models/enrichmentfield.py +25 -0
  61. mixpeek/models/errordetail.py +1 -1
  62. mixpeek/models/{update_node_v1_entities_taxonomies_nodes_node_patchop.py → execute_retriever_v1_retrievers_retrievers_retriever_id_execute_postop.py} +11 -11
  63. mixpeek/models/featureextractorconfig.py +116 -0
  64. mixpeek/models/featureextractordefinition.py +192 -0
  65. mixpeek/models/filtercondition.py +25 -25
  66. mixpeek/models/filteroperator.py +24 -0
  67. mixpeek/models/generativemodels.py +10 -0
  68. mixpeek/models/{delete_feature_v1_features_feature_id_deleteop.py → get_bucket_v1_buckets_bucket_identifier_getop.py} +5 -5
  69. mixpeek/models/{list_taxonomies_v1_entities_taxonomies_getop.py → get_cache_stats_v1_collections_cache_stats_getop.py} +16 -14
  70. mixpeek/models/get_collection_v1_collections_collection_id_getop.py +59 -0
  71. mixpeek/models/get_document_v1_collections_collection_identifier_documents_document_id_getop.py +70 -0
  72. mixpeek/models/get_feature_extractor_v1_features_extractors_feature_id_getop.py +16 -0
  73. mixpeek/models/get_interaction_v1_retrievers_interactions_interaction_id_getop.py +57 -0
  74. mixpeek/models/{delete_collection_v1_collections_collection_deleteop.py → get_object_v1_buckets_bucket_identifier_objects_object_identifier_getop.py} +16 -7
  75. mixpeek/models/get_research_v1_research_getop.py +52 -0
  76. mixpeek/models/get_retriever_stages_v1_retrievers_stages_getop.py +52 -0
  77. mixpeek/models/{delete_taxonomy_v1_entities_taxonomies_taxonomy_deleteop.py → get_retriever_v1_retrievers_retrievers_retriever_id_getop.py} +5 -7
  78. mixpeek/models/get_task_v1_tasks_task_id_getop.py +1 -1
  79. mixpeek/models/getusagerequestmodel.py +91 -0
  80. mixpeek/models/hdbscanparameters.py +26 -0
  81. mixpeek/models/interactionresponse.py +86 -0
  82. mixpeek/models/interactiontype.py +22 -0
  83. mixpeek/models/{search_features_v1_features_search_postop.py → invalidate_cache_v1_collections_cache_invalidate_postop.py} +60 -34
  84. mixpeek/models/invalidationevent.py +67 -0
  85. mixpeek/models/invalidationstrategy.py +12 -0
  86. mixpeek/models/kill_task_v1_tasks_task_id_deleteop.py +1 -1
  87. mixpeek/models/list_active_tasks_v1_tasks_getop.py +1 -1
  88. mixpeek/models/{list_assets_v1_assets_postop.py → list_buckets_v1_buckets_postop.py} +18 -18
  89. mixpeek/models/{list_features_v1_features_postop.py → list_documents_v1_collections_collection_identifier_documents_getop.py} +54 -19
  90. mixpeek/models/list_interactions_v1_retrievers_interactions_getop.py +96 -0
  91. mixpeek/models/{list_classifications_v1_entities_taxonomies_taxonomy_classifications_postop.py → list_objects_v1_buckets_bucket_identifier_objects_postop.py} +22 -29
  92. mixpeek/models/{groupbyoptionsasset.py → listbucketsrequest.py} +19 -28
  93. mixpeek/models/listbucketsresponse.py +23 -0
  94. mixpeek/models/{groupbyoptions.py → listobjectsrequest.py} +19 -28
  95. mixpeek/models/listobjectsresponse.py +25 -0
  96. mixpeek/models/listtasksresponse.py +3 -6
  97. mixpeek/models/{logicaloperator.py → logicaloperator_input.py} +42 -24
  98. mixpeek/models/logicaloperator_output.py +121 -0
  99. mixpeek/models/multivectorindex.py +25 -0
  100. mixpeek/models/namespaceresponse.py +1 -1
  101. mixpeek/models/namespaceusage.py +45 -0
  102. mixpeek/models/namingmethod.py +8 -0
  103. mixpeek/models/objectresponse.py +124 -0
  104. mixpeek/models/{db_model_paginationresponse.py → paginationresponse.py} +3 -3
  105. mixpeek/models/payloadindexconfig.py +1 -1
  106. mixpeek/models/plan.py +82 -0
  107. mixpeek/models/recomputestrategy.py +12 -0
  108. mixpeek/models/resourcetotals.py +39 -0
  109. mixpeek/models/{jsonvideooutputsettings.py → retrieverbinding.py} +19 -11
  110. mixpeek/models/{logodetectsettings.py → retrievercacheconfig.py} +20 -11
  111. mixpeek/models/retrievermodel.py +95 -0
  112. mixpeek/models/retrieverqueryrequest.py +114 -0
  113. mixpeek/models/retrieverresponse.py +24 -0
  114. mixpeek/models/searchinteraction.py +81 -0
  115. mixpeek/models/singlelineageentry.py +99 -0
  116. mixpeek/models/sortdirection.py +11 -0
  117. mixpeek/models/sortoption.py +20 -12
  118. mixpeek/models/sourceconfig_input.py +72 -0
  119. mixpeek/models/sourceconfig_output.py +75 -0
  120. mixpeek/models/sourcetype.py +11 -0
  121. mixpeek/models/stageconfig_input.py +111 -0
  122. mixpeek/models/stageconfig_output.py +114 -0
  123. mixpeek/models/stagedefinition.py +110 -0
  124. mixpeek/models/{jsonimageoutputsettings.py → stageresponse.py} +21 -11
  125. mixpeek/models/taskresponse.py +1 -1
  126. mixpeek/models/taskstatus.py +1 -0
  127. mixpeek/models/{assetfeatures.py → taxonomyapplicationconfig.py} +23 -15
  128. mixpeek/models/taxonomyconfig.py +19 -0
  129. mixpeek/models/timeseriesdatapoint.py +25 -0
  130. mixpeek/models/timeseriesusage.py +36 -0
  131. mixpeek/models/{full_asset_update_v1_assets_asset_id_putop.py → update_bucket_v1_buckets_bucket_identifier_putop.py} +9 -9
  132. mixpeek/models/{update_taxonomy_v1_entities_taxonomies_taxonomy_patchop.py → update_document_v1_collections_collection_identifier_documents_document_id_putop.py} +25 -13
  133. mixpeek/models/{full_feature_update_v1_features_feature_id_putop.py → update_object_v1_buckets_bucket_identifier_objects_object_identifier_putop.py} +20 -9
  134. mixpeek/models/updatenamespacerequest.py +1 -1
  135. mixpeek/models/updateobjectrequest.py +75 -0
  136. mixpeek/models/usageresponse.py +86 -0
  137. mixpeek/models/usagesummary.py +39 -0
  138. mixpeek/models/usagetimerange.py +16 -0
  139. mixpeek/models/usermodel_input.py +3 -0
  140. mixpeek/models/usermodel_output.py +3 -0
  141. mixpeek/models/vectorbasedconfig.py +60 -0
  142. mixpeek/models/{collectionresult.py → vectorindex.py} +20 -15
  143. mixpeek/models/vectorindexdefinition.py +43 -0
  144. mixpeek/models/vectortype.py +4 -1
  145. mixpeek/namespaces.py +26 -480
  146. mixpeek/organizationnotifications.py +214 -0
  147. mixpeek/organizations.py +6 -210
  148. mixpeek/{featureextractors.py → organizationsusage.py} +31 -39
  149. mixpeek/research.py +228 -0
  150. mixpeek/retrieverinteractions.py +1036 -0
  151. mixpeek/{ingestassets.py → retrievers.py} +209 -271
  152. mixpeek/retrieverstages.py +232 -0
  153. mixpeek/sdk.py +40 -23
  154. mixpeek/taxonomies.py +43 -513
  155. mixpeek/types/basemodel.py +3 -3
  156. mixpeek/utils/enums.py +67 -27
  157. {mixpeek-0.20.20.dist-info → mixpeek-0.21.6.dist-info}/METADATA +68 -50
  158. mixpeek-0.21.6.dist-info/RECORD +216 -0
  159. {mixpeek-0.20.20.dist-info → mixpeek-0.21.6.dist-info}/WHEEL +1 -1
  160. mixpeek/models/actionusage.py +0 -16
  161. mixpeek/models/assetresponse.py +0 -166
  162. mixpeek/models/assets_model_searchquery.py +0 -21
  163. mixpeek/models/assetupdate.py +0 -28
  164. mixpeek/models/assignmentconfig.py +0 -67
  165. mixpeek/models/assignmentmode.py +0 -11
  166. mixpeek/models/availablemodels.py +0 -16
  167. mixpeek/models/availablemodelsresponse.py +0 -27
  168. mixpeek/models/classificationmatch.py +0 -77
  169. mixpeek/models/classificationwithfeature.py +0 -73
  170. mixpeek/models/collectiondetailsresponse.py +0 -83
  171. mixpeek/models/dateusage.py +0 -22
  172. mixpeek/models/denseembedding.py +0 -16
  173. mixpeek/models/discoverrequest.py +0 -64
  174. mixpeek/models/embeddingconfig.py +0 -33
  175. mixpeek/models/embeddingrequest.py +0 -92
  176. mixpeek/models/embeddingresponse.py +0 -64
  177. mixpeek/models/entitysettings.py +0 -50
  178. mixpeek/models/featureoptions.py +0 -25
  179. mixpeek/models/features_model_paginationresponse.py +0 -59
  180. mixpeek/models/featureupdaterequest.py +0 -21
  181. mixpeek/models/get_asset_v1_assets_asset_id_getop.py +0 -73
  182. mixpeek/models/get_asset_with_features_v1_assets_asset_id_features_getop.py +0 -73
  183. mixpeek/models/get_collection_details_v1_collections_collection_details_getop.py +0 -59
  184. mixpeek/models/get_collection_details_v1_collections_collection_getop.py +0 -59
  185. mixpeek/models/get_feature_v1_features_feature_id_getop.py +0 -70
  186. mixpeek/models/get_taxonomy_node_v1_entities_taxonomies_nodes_node_getop.py +0 -59
  187. mixpeek/models/groupedassetdata.py +0 -18
  188. mixpeek/models/imagedescribesettings.py +0 -82
  189. mixpeek/models/imagedetectsettings.py +0 -47
  190. mixpeek/models/imagereadsettings.py +0 -71
  191. mixpeek/models/imagesettings.py +0 -92
  192. mixpeek/models/listassetsrequest.py +0 -75
  193. mixpeek/models/listassetsresponse.py +0 -22
  194. mixpeek/models/listclassificationsrequest.py +0 -69
  195. mixpeek/models/listclassificationsresponse.py +0 -31
  196. mixpeek/models/listcollectionsresponse.py +0 -22
  197. mixpeek/models/listfeaturesrequest.py +0 -77
  198. mixpeek/models/listfeaturesresponse.py +0 -22
  199. mixpeek/models/listtaxonomiesresponse.py +0 -24
  200. mixpeek/models/modality.py +0 -13
  201. mixpeek/models/modeldetails.py +0 -61
  202. mixpeek/models/nodeoptions.py +0 -16
  203. mixpeek/models/patch_namespace_v1_namespaces_namespace_patchop.py +0 -28
  204. mixpeek/models/payloadindextype.py +0 -17
  205. mixpeek/models/processimageurlinput.py +0 -87
  206. mixpeek/models/processtextinput.py +0 -82
  207. mixpeek/models/processvideourlinput.py +0 -87
  208. mixpeek/models/querysettings.py +0 -56
  209. mixpeek/models/rerankingoptions.py +0 -47
  210. mixpeek/models/search_model_searchquery.py +0 -76
  211. mixpeek/models/searchassetsrequest.py +0 -78
  212. mixpeek/models/searchrequestfeatures.py +0 -153
  213. mixpeek/models/sparseembedding.py +0 -21
  214. mixpeek/models/taxonomycreate.py +0 -20
  215. mixpeek/models/taxonomyextractionconfig.py +0 -26
  216. mixpeek/models/taxonomymodel.py +0 -27
  217. mixpeek/models/taxonomynode.py +0 -101
  218. mixpeek/models/taxonomynodecreate.py +0 -63
  219. mixpeek/models/textsettings.py +0 -67
  220. mixpeek/models/updateassetrequest.py +0 -60
  221. mixpeek/models/usage.py +0 -18
  222. mixpeek/models/vectormodel.py +0 -15
  223. mixpeek/models/videodescribesettings.py +0 -82
  224. mixpeek/models/videodetectsettings.py +0 -47
  225. mixpeek/models/videoreadsettings.py +0 -71
  226. mixpeek/models/videosettings.py +0 -115
  227. mixpeek/models/videotranscriptionsettings.py +0 -69
  228. 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 IngestAssets(BaseSDK):
12
- def ingest_text(
11
+ class Retrievers(BaseSDK):
12
+ def create(
13
13
  self,
14
14
  *,
15
- collection: str,
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
- asset_update: OptionalNullable[
18
- Union[models.AssetUpdate, models.AssetUpdateTypedDict]
19
- ] = UNSET,
24
+ description: OptionalNullable[str] = UNSET,
20
25
  metadata: Optional[
21
26
  Union[
22
- models.ProcessTextInputMetadata,
23
- models.ProcessTextInputMetadataTypedDict,
27
+ models.CreateRetrieverRequestMetadata,
28
+ models.CreateRetrieverRequestMetadataTypedDict,
24
29
  ]
25
30
  ] = None,
26
- feature_extractors: OptionalNullable[
27
- Union[models.TextSettings, models.TextSettingsTypedDict]
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.TaskResponse:
35
- r"""Ingest Text
36
-
37
- **Requirements:**
38
- - Required permissions: write
38
+ ) -> models.RetrieverModel:
39
+ r"""Create Retriever
39
40
 
40
- :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.
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 asset_update: Controls how processing results are stored - either creating a new asset or updating an existing one.
43
- :param metadata: Additional metadata associated with the file. Can include any key-value pairs relevant to the file.
44
- :param feature_extractors: Settings for text processing.
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.IngestTextV1IngestTextPostRequest(
64
+ request = models.CreateRetrieverV1RetrieversRetrieversPostRequest(
62
65
  x_namespace=x_namespace,
63
- process_text_input=models.ProcessTextInput(
64
- collection=collection,
65
- asset_update=utils.get_pydantic_model(
66
- asset_update, OptionalNullable[models.AssetUpdate]
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.ProcessTextInputMetadata]
75
+ metadata, Optional[models.CreateRetrieverRequestMetadata]
70
76
  ),
71
- feature_extractors=utils.get_pydantic_model(
72
- feature_extractors, OptionalNullable[models.TextSettings]
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/ingest/text",
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.process_text_input,
97
+ request.create_retriever_request,
93
98
  False,
94
99
  False,
95
100
  "json",
96
- models.ProcessTextInput,
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="ingest_text_v1_ingest_text_post",
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.TaskResponse)
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 ingest_text_async(
168
+ async def create_async(
164
169
  self,
165
170
  *,
166
- collection: str,
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
- asset_update: OptionalNullable[
169
- Union[models.AssetUpdate, models.AssetUpdateTypedDict]
170
- ] = UNSET,
180
+ description: OptionalNullable[str] = UNSET,
171
181
  metadata: Optional[
172
182
  Union[
173
- models.ProcessTextInputMetadata,
174
- models.ProcessTextInputMetadataTypedDict,
183
+ models.CreateRetrieverRequestMetadata,
184
+ models.CreateRetrieverRequestMetadataTypedDict,
175
185
  ]
176
186
  ] = None,
177
- feature_extractors: OptionalNullable[
178
- Union[models.TextSettings, models.TextSettingsTypedDict]
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.TaskResponse:
186
- r"""Ingest Text
194
+ ) -> models.RetrieverModel:
195
+ r"""Create Retriever
187
196
 
188
- **Requirements:**
189
- - Required permissions: write
190
-
191
- :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.
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 asset_update: Controls how processing results are stored - either creating a new asset or updating an existing one.
194
- :param metadata: Additional metadata associated with the file. Can include any key-value pairs relevant to the file.
195
- :param feature_extractors: Settings for text processing.
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.IngestTextV1IngestTextPostRequest(
220
+ request = models.CreateRetrieverV1RetrieversRetrieversPostRequest(
213
221
  x_namespace=x_namespace,
214
- process_text_input=models.ProcessTextInput(
215
- collection=collection,
216
- asset_update=utils.get_pydantic_model(
217
- asset_update, OptionalNullable[models.AssetUpdate]
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.ProcessTextInputMetadata]
231
+ metadata, Optional[models.CreateRetrieverRequestMetadata]
221
232
  ),
222
- feature_extractors=utils.get_pydantic_model(
223
- feature_extractors, OptionalNullable[models.TextSettings]
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/ingest/text",
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.process_text_input,
253
+ request.create_retriever_request,
244
254
  False,
245
255
  False,
246
256
  "json",
247
- models.ProcessTextInput,
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="ingest_text_v1_ingest_text_post",
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.TaskResponse)
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 ingest_video_url(
324
+ def get(
315
325
  self,
316
326
  *,
317
- url: str,
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.TaskResponse:
338
- r"""Ingest Video Url
339
-
340
- **Requirements:**
341
- - Required permissions: write
333
+ ) -> models.RetrieverModel:
334
+ r"""Get Retriever
342
335
 
343
- :param url: The URL of the asset to be processed. Must be a valid HTTP or HTTPS URL.
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.IngestVideoURLV1IngestVideosURLPostRequest(
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="POST",
385
- path="/v1/ingest/videos/url",
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=True,
390
- request_has_path_params=False,
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="ingest_video_url_v1_ingest_videos_url_post",
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.TaskResponse)
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 ingest_video_url_async(
436
+ async def get_async(
469
437
  self,
470
438
  *,
471
- url: str,
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.TaskResponse:
492
- r"""Ingest Video Url
445
+ ) -> models.RetrieverModel:
446
+ r"""Get Retriever
493
447
 
494
- **Requirements:**
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.IngestVideoURLV1IngestVideosURLPostRequest(
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="POST",
539
- path="/v1/ingest/videos/url",
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=True,
544
- request_has_path_params=False,
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="ingest_video_url_v1_ingest_videos_url_post",
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.TaskResponse)
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 ingest_image_url(
548
+ def execute(
623
549
  self,
624
550
  *,
625
- url: str,
626
- collection: str,
551
+ retriever_id: str,
552
+ inputs: Union[
553
+ models.RetrieverQueryRequestInputs,
554
+ models.RetrieverQueryRequestInputsTypedDict,
555
+ ],
627
556
  x_namespace: OptionalNullable[str] = UNSET,
628
- asset_update: OptionalNullable[
629
- Union[models.AssetUpdate, models.AssetUpdateTypedDict]
557
+ filters: OptionalNullable[
558
+ Union[models.LogicalOperatorInput, models.LogicalOperatorInputTypedDict]
630
559
  ] = UNSET,
631
- metadata: Optional[
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.TaskResponse:
646
- r"""Ingest Image Url
647
-
648
- **Requirements:**
649
- - Required permissions: write
572
+ ) -> models.RetrieverResponse:
573
+ r"""Execute Retriever
650
574
 
651
- :param url: The URL of the asset to be processed. Must be a valid HTTP or HTTPS URL.
652
- :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.
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 asset_update: Controls how processing results are stored - either creating a new asset or updating an existing one.
655
- :param metadata: Additional metadata associated with the asset. Can include any key-value pairs relevant to the asset.
656
- :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.
657
- :param feature_extractors: Settings for image processing. Only applicable if the URL points to an image file.
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 = models.IngestImageURLV1IngestImagesURLPostRequest(
674
- x_namespace=x_namespace,
675
- process_image_url_input=models.ProcessImageURLInput(
676
- url=url,
677
- collection=collection,
678
- asset_update=utils.get_pydantic_model(
679
- asset_update, OptionalNullable[models.AssetUpdate]
680
- ),
681
- metadata=utils.get_pydantic_model(
682
- metadata, Optional[models.ProcessImageURLInputMetadata]
683
- ),
684
- skip_duplicate=skip_duplicate,
685
- feature_extractors=utils.get_pydantic_model(
686
- feature_extractors, OptionalNullable[models.ImageSettings]
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/ingest/images/url",
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=False,
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.process_image_url_input,
637
+ request.retriever_query_request,
706
638
  False,
707
639
  False,
708
640
  "json",
709
- models.ProcessImageURLInput,
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="ingest_image_url_v1_ingest_images_url_post",
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.TaskResponse)
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 ingest_image_url_async(
708
+ async def execute_async(
777
709
  self,
778
710
  *,
779
- url: str,
780
- collection: str,
711
+ retriever_id: str,
712
+ inputs: Union[
713
+ models.RetrieverQueryRequestInputs,
714
+ models.RetrieverQueryRequestInputsTypedDict,
715
+ ],
781
716
  x_namespace: OptionalNullable[str] = UNSET,
782
- asset_update: OptionalNullable[
783
- Union[models.AssetUpdate, models.AssetUpdateTypedDict]
717
+ filters: OptionalNullable[
718
+ Union[models.LogicalOperatorInput, models.LogicalOperatorInputTypedDict]
784
719
  ] = UNSET,
785
- metadata: Optional[
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.TaskResponse:
800
- r"""Ingest Image Url
732
+ ) -> models.RetrieverResponse:
733
+ r"""Execute Retriever
801
734
 
802
- **Requirements:**
803
- - Required permissions: write
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 asset_update: Controls how processing results are stored - either creating a new asset or updating an existing one.
809
- :param metadata: Additional metadata associated with the asset. Can include any key-value pairs relevant to the asset.
810
- :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.
811
- :param feature_extractors: Settings for image processing. Only applicable if the URL points to an image file.
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 = models.IngestImageURLV1IngestImagesURLPostRequest(
828
- x_namespace=x_namespace,
829
- process_image_url_input=models.ProcessImageURLInput(
830
- url=url,
831
- collection=collection,
832
- asset_update=utils.get_pydantic_model(
833
- asset_update, OptionalNullable[models.AssetUpdate]
834
- ),
835
- metadata=utils.get_pydantic_model(
836
- metadata, Optional[models.ProcessImageURLInputMetadata]
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
- skip_duplicate=skip_duplicate,
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/ingest/images/url",
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=False,
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.process_image_url_input,
797
+ request.retriever_query_request,
860
798
  False,
861
799
  False,
862
800
  "json",
863
- models.ProcessImageURLInput,
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="ingest_image_url_v1_ingest_images_url_post",
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.TaskResponse)
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
  ):