mixpeek 0.20.19__py3-none-any.whl → 0.21.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (228) hide show
  1. mixpeek/_version.py +3 -3
  2. mixpeek/{assets.py → bucket_objects.py} +309 -793
  3. mixpeek/buckets.py +1292 -0
  4. mixpeek/clusters.py +306 -0
  5. mixpeek/collection_cache.py +820 -0
  6. mixpeek/{taxonomyentities.py → collection_documents.py} +305 -559
  7. mixpeek/collections.py +122 -996
  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/organization_notifications.py +214 -0
  147. mixpeek/organizations.py +6 -210
  148. mixpeek/{featureextractors.py → organizations_usage.py} +31 -39
  149. mixpeek/research.py +228 -0
  150. mixpeek/retriever_interactions.py +1036 -0
  151. mixpeek/retriever_stages.py +232 -0
  152. mixpeek/{ingestassets.py → retrievers.py} +209 -271
  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.19.dist-info → mixpeek-0.21.1.dist-info}/METADATA +68 -50
  158. mixpeek-0.21.1.dist-info/RECORD +216 -0
  159. {mixpeek-0.20.19.dist-info → mixpeek-0.21.1.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.19.dist-info/RECORD +0 -201
@@ -0,0 +1,124 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .blobmodel import BlobModel, BlobModelTypedDict
5
+ from .taskstatus import TaskStatus
6
+ from datetime import datetime
7
+ from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
8
+ from pydantic import model_serializer
9
+ from typing import List
10
+ from typing_extensions import NotRequired, TypedDict
11
+
12
+
13
+ class ObjectResponseMetadataTypedDict(TypedDict):
14
+ r"""Additional metadata for the object, appended to downstream documents of connected collections"""
15
+
16
+
17
+ class ObjectResponseMetadata(BaseModel):
18
+ r"""Additional metadata for the object, appended to downstream documents of connected collections"""
19
+
20
+
21
+ class ObjectResponseTypedDict(TypedDict):
22
+ r"""Response model for bucket objects"""
23
+
24
+ object_id: str
25
+ r"""Unique identifier for the object"""
26
+ bucket_id: str
27
+ r"""ID of the bucket this object belongs to"""
28
+ blobs: List[BlobModelTypedDict]
29
+ r"""List of blobs contained in this object"""
30
+ status: TaskStatus
31
+ metadata: ObjectResponseMetadataTypedDict
32
+ r"""Additional metadata for the object, appended to downstream documents of connected collections"""
33
+ task_id: NotRequired[Nullable[str]]
34
+ r"""ID of the task that created this object, used to track the object creation progress and status"""
35
+ key: NotRequired[Nullable[str]]
36
+ r"""Storage key/path of the object, used to retrieve the object from storage"""
37
+ created_by: NotRequired[Nullable[str]]
38
+ r"""Identifier of the entity that created this object"""
39
+ error: NotRequired[Nullable[str]]
40
+ r"""Error message if the object processing failed"""
41
+ created_at: NotRequired[Nullable[datetime]]
42
+ r"""Timestamp when the object was created"""
43
+ updated_at: NotRequired[Nullable[datetime]]
44
+ r"""Timestamp when the object was last updated"""
45
+
46
+
47
+ class ObjectResponse(BaseModel):
48
+ r"""Response model for bucket objects"""
49
+
50
+ object_id: str
51
+ r"""Unique identifier for the object"""
52
+
53
+ bucket_id: str
54
+ r"""ID of the bucket this object belongs to"""
55
+
56
+ blobs: List[BlobModel]
57
+ r"""List of blobs contained in this object"""
58
+
59
+ status: TaskStatus
60
+
61
+ metadata: ObjectResponseMetadata
62
+ r"""Additional metadata for the object, appended to downstream documents of connected collections"""
63
+
64
+ task_id: OptionalNullable[str] = UNSET
65
+ r"""ID of the task that created this object, used to track the object creation progress and status"""
66
+
67
+ key: OptionalNullable[str] = UNSET
68
+ r"""Storage key/path of the object, used to retrieve the object from storage"""
69
+
70
+ created_by: OptionalNullable[str] = UNSET
71
+ r"""Identifier of the entity that created this object"""
72
+
73
+ error: OptionalNullable[str] = UNSET
74
+ r"""Error message if the object processing failed"""
75
+
76
+ created_at: OptionalNullable[datetime] = UNSET
77
+ r"""Timestamp when the object was created"""
78
+
79
+ updated_at: OptionalNullable[datetime] = UNSET
80
+ r"""Timestamp when the object was last updated"""
81
+
82
+ @model_serializer(mode="wrap")
83
+ def serialize_model(self, handler):
84
+ optional_fields = [
85
+ "task_id",
86
+ "key",
87
+ "created_by",
88
+ "error",
89
+ "created_at",
90
+ "updated_at",
91
+ ]
92
+ nullable_fields = [
93
+ "task_id",
94
+ "key",
95
+ "created_by",
96
+ "error",
97
+ "created_at",
98
+ "updated_at",
99
+ ]
100
+ null_default_fields = []
101
+
102
+ serialized = handler(self)
103
+
104
+ m = {}
105
+
106
+ for n, f in type(self).model_fields.items():
107
+ k = f.alias or n
108
+ val = serialized.get(k)
109
+ serialized.pop(k, None)
110
+
111
+ optional_nullable = k in optional_fields and k in nullable_fields
112
+ is_set = (
113
+ self.__pydantic_fields_set__.intersection({n})
114
+ or k in null_default_fields
115
+ ) # pylint: disable=no-member
116
+
117
+ if val is not None and val != UNSET_SENTINEL:
118
+ m[k] = val
119
+ elif val != UNSET_SENTINEL and (
120
+ not k in optional_fields or (optional_nullable and is_set)
121
+ ):
122
+ m[k] = val
123
+
124
+ return m
@@ -6,7 +6,7 @@ from pydantic import model_serializer
6
6
  from typing_extensions import TypedDict
7
7
 
8
8
 
9
- class DbModelPaginationResponseTypedDict(TypedDict):
9
+ class PaginationResponseTypedDict(TypedDict):
10
10
  total: int
11
11
  page: int
12
12
  page_size: int
@@ -15,7 +15,7 @@ class DbModelPaginationResponseTypedDict(TypedDict):
15
15
  previous_page: Nullable[str]
16
16
 
17
17
 
18
- class DbModelPaginationResponse(BaseModel):
18
+ class PaginationResponse(BaseModel):
19
19
  total: int
20
20
 
21
21
  page: int
@@ -38,7 +38,7 @@ class DbModelPaginationResponse(BaseModel):
38
38
 
39
39
  m = {}
40
40
 
41
- for n, f in self.model_fields.items():
41
+ for n, f in type(self).model_fields.items():
42
42
  k = f.alias or n
43
43
  val = serialized.get(k)
44
44
  serialized.pop(k, None)
@@ -73,7 +73,7 @@ class PayloadIndexConfig(BaseModel):
73
73
 
74
74
  m = {}
75
75
 
76
- for n, f in self.model_fields.items():
76
+ for n, f in type(self).model_fields.items():
77
77
  k = f.alias or n
78
78
  val = serialized.get(k)
79
79
  serialized.pop(k, None)
mixpeek/models/plan.py ADDED
@@ -0,0 +1,82 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .resourcetotals import ResourceTotals, ResourceTotalsTypedDict
5
+ from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
6
+ from pydantic import model_serializer
7
+ from typing import List, Optional
8
+ from typing_extensions import NotRequired, TypedDict
9
+
10
+
11
+ class PlanTypedDict(TypedDict):
12
+ r"""Subscription plan model"""
13
+
14
+ name: str
15
+ r"""Display name of the plan"""
16
+ totals: ResourceTotalsTypedDict
17
+ r"""Resource totals for the organization"""
18
+ description: NotRequired[Nullable[str]]
19
+ r"""Plan description"""
20
+ price_monthly_usd: NotRequired[Nullable[float]]
21
+ r"""Monthly price in USD"""
22
+ price_yearly_usd: NotRequired[Nullable[float]]
23
+ r"""Yearly price in USD"""
24
+ features: NotRequired[List[str]]
25
+ r"""Available features for extraction"""
26
+
27
+
28
+ class Plan(BaseModel):
29
+ r"""Subscription plan model"""
30
+
31
+ name: str
32
+ r"""Display name of the plan"""
33
+
34
+ totals: ResourceTotals
35
+ r"""Resource totals for the organization"""
36
+
37
+ description: OptionalNullable[str] = UNSET
38
+ r"""Plan description"""
39
+
40
+ price_monthly_usd: OptionalNullable[float] = UNSET
41
+ r"""Monthly price in USD"""
42
+
43
+ price_yearly_usd: OptionalNullable[float] = UNSET
44
+ r"""Yearly price in USD"""
45
+
46
+ features: Optional[List[str]] = None
47
+ r"""Available features for extraction"""
48
+
49
+ @model_serializer(mode="wrap")
50
+ def serialize_model(self, handler):
51
+ optional_fields = [
52
+ "description",
53
+ "price_monthly_usd",
54
+ "price_yearly_usd",
55
+ "features",
56
+ ]
57
+ nullable_fields = ["description", "price_monthly_usd", "price_yearly_usd"]
58
+ null_default_fields = []
59
+
60
+ serialized = handler(self)
61
+
62
+ m = {}
63
+
64
+ for n, f in type(self).model_fields.items():
65
+ k = f.alias or n
66
+ val = serialized.get(k)
67
+ serialized.pop(k, None)
68
+
69
+ optional_nullable = k in optional_fields and k in nullable_fields
70
+ is_set = (
71
+ self.__pydantic_fields_set__.intersection({n})
72
+ or k in null_default_fields
73
+ ) # pylint: disable=no-member
74
+
75
+ if val is not None and val != UNSET_SENTINEL:
76
+ m[k] = val
77
+ elif val != UNSET_SENTINEL and (
78
+ not k in optional_fields or (optional_nullable and is_set)
79
+ ):
80
+ m[k] = val
81
+
82
+ return m
@@ -0,0 +1,12 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from enum import Enum
5
+
6
+
7
+ class RecomputeStrategy(str, Enum):
8
+ r"""Strategies for recomputing cache entries"""
9
+
10
+ IMMEDIATE = "immediate"
11
+ BACKGROUND = "background"
12
+ LAZY = "lazy"
@@ -0,0 +1,39 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from mixpeek.types import BaseModel
5
+ from typing_extensions import TypedDict
6
+
7
+
8
+ class ResourceTotalsTypedDict(TypedDict):
9
+ r"""Resource totals for the organization"""
10
+
11
+ storage_gb: float
12
+ r"""Total storage in GB"""
13
+ api_calls_per_month: int
14
+ r"""Total API calls per month"""
15
+ documents: int
16
+ r"""Total number of documents"""
17
+ collections: int
18
+ r"""Total number of collections"""
19
+ namespaces: int
20
+ r"""Total number of namespaces"""
21
+
22
+
23
+ class ResourceTotals(BaseModel):
24
+ r"""Resource totals for the organization"""
25
+
26
+ storage_gb: float
27
+ r"""Total storage in GB"""
28
+
29
+ api_calls_per_month: int
30
+ r"""Total API calls per month"""
31
+
32
+ documents: int
33
+ r"""Total number of documents"""
34
+
35
+ collections: int
36
+ r"""Total number of collections"""
37
+
38
+ namespaces: int
39
+ r"""Total number of namespaces"""
@@ -6,35 +6,43 @@ from pydantic import model_serializer
6
6
  from typing_extensions import NotRequired, TypedDict
7
7
 
8
8
 
9
- class JSONVideoOutputSettingsResponseShapeTypedDict(TypedDict):
9
+ class InputsTypedDict(TypedDict):
10
10
  pass
11
11
 
12
12
 
13
- class JSONVideoOutputSettingsResponseShape(BaseModel):
13
+ class Inputs(BaseModel):
14
14
  pass
15
15
 
16
16
 
17
- class JSONVideoOutputSettingsTypedDict(TypedDict):
18
- response_shape: NotRequired[Nullable[JSONVideoOutputSettingsResponseShapeTypedDict]]
19
- prompt: NotRequired[Nullable[str]]
17
+ class RetrieverBindingTypedDict(TypedDict):
18
+ r"""How a retriever should be used in a taxonomy"""
20
19
 
20
+ retriever_id: str
21
+ r"""ID of the retriever to use"""
22
+ inputs: NotRequired[Nullable[InputsTypedDict]]
23
+ r"""Optional inputs to the retriever. If not provided, will use source collection schema"""
21
24
 
22
- class JSONVideoOutputSettings(BaseModel):
23
- response_shape: OptionalNullable[JSONVideoOutputSettingsResponseShape] = UNSET
24
25
 
25
- prompt: OptionalNullable[str] = UNSET
26
+ class RetrieverBinding(BaseModel):
27
+ r"""How a retriever should be used in a taxonomy"""
28
+
29
+ retriever_id: str
30
+ r"""ID of the retriever to use"""
31
+
32
+ inputs: OptionalNullable[Inputs] = UNSET
33
+ r"""Optional inputs to the retriever. If not provided, will use source collection schema"""
26
34
 
27
35
  @model_serializer(mode="wrap")
28
36
  def serialize_model(self, handler):
29
- optional_fields = ["response_shape", "prompt"]
30
- nullable_fields = ["response_shape", "prompt"]
37
+ optional_fields = ["inputs"]
38
+ nullable_fields = ["inputs"]
31
39
  null_default_fields = []
32
40
 
33
41
  serialized = handler(self)
34
42
 
35
43
  m = {}
36
44
 
37
- for n, f in self.model_fields.items():
45
+ for n, f in type(self).model_fields.items():
38
46
  k = f.alias or n
39
47
  val = serialized.get(k)
40
48
  serialized.pop(k, None)
@@ -7,31 +7,40 @@ from typing import Optional
7
7
  from typing_extensions import NotRequired, TypedDict
8
8
 
9
9
 
10
- class LogoDetectSettingsTypedDict(TypedDict):
10
+ class RetrieverCacheConfigTypedDict(TypedDict):
11
+ r"""Configuration for retriever-specific caching"""
12
+
11
13
  enabled: NotRequired[bool]
12
- r"""Enable logo detection"""
13
- confidence_threshold: NotRequired[Nullable[float]]
14
- r"""Minimum confidence threshold for detected logos"""
14
+ r"""Whether caching is enabled for this retriever"""
15
+ ttl_seconds: NotRequired[Nullable[int]]
16
+ r"""Optional retriever-specific TTL override"""
17
+ score_threshold: NotRequired[Nullable[float]]
18
+ r"""Optional retriever-specific score threshold"""
19
+
15
20
 
21
+ class RetrieverCacheConfig(BaseModel):
22
+ r"""Configuration for retriever-specific caching"""
16
23
 
17
- class LogoDetectSettings(BaseModel):
18
24
  enabled: Optional[bool] = True
19
- r"""Enable logo detection"""
25
+ r"""Whether caching is enabled for this retriever"""
26
+
27
+ ttl_seconds: OptionalNullable[int] = UNSET
28
+ r"""Optional retriever-specific TTL override"""
20
29
 
21
- confidence_threshold: OptionalNullable[float] = UNSET
22
- r"""Minimum confidence threshold for detected logos"""
30
+ score_threshold: OptionalNullable[float] = UNSET
31
+ r"""Optional retriever-specific score threshold"""
23
32
 
24
33
  @model_serializer(mode="wrap")
25
34
  def serialize_model(self, handler):
26
- optional_fields = ["enabled", "confidence_threshold"]
27
- nullable_fields = ["confidence_threshold"]
35
+ optional_fields = ["enabled", "ttl_seconds", "score_threshold"]
36
+ nullable_fields = ["ttl_seconds", "score_threshold"]
28
37
  null_default_fields = []
29
38
 
30
39
  serialized = handler(self)
31
40
 
32
41
  m = {}
33
42
 
34
- for n, f in self.model_fields.items():
43
+ for n, f in type(self).model_fields.items():
35
44
  k = f.alias or n
36
45
  val = serialized.get(k)
37
46
  serialized.pop(k, None)
@@ -0,0 +1,95 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .bucketschema_output import BucketSchemaOutput, BucketSchemaOutputTypedDict
5
+ from .retrievercacheconfig import RetrieverCacheConfig, RetrieverCacheConfigTypedDict
6
+ from .stageconfig_output import StageConfigOutput, StageConfigOutputTypedDict
7
+ from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
8
+ from pydantic import model_serializer
9
+ from typing import List, Optional
10
+ from typing_extensions import NotRequired, TypedDict
11
+
12
+
13
+ class RetrieverModelMetadataTypedDict(TypedDict):
14
+ pass
15
+
16
+
17
+ class RetrieverModelMetadata(BaseModel):
18
+ pass
19
+
20
+
21
+ class RetrieverModelTypedDict(TypedDict):
22
+ r"""Definition of a retriever"""
23
+
24
+ retriever_name: str
25
+ r"""Name of the retriever"""
26
+ input_schema: BucketSchemaOutputTypedDict
27
+ r"""Schema definition for bucket objects"""
28
+ collection_ids: List[str]
29
+ r"""List of collection IDs to search in"""
30
+ stages: List[StageConfigOutputTypedDict]
31
+ r"""List of stages to execute in order"""
32
+ retriever_id: NotRequired[str]
33
+ r"""Unique identifier for the retriever"""
34
+ description: NotRequired[Nullable[str]]
35
+ r"""Description of the retriever"""
36
+ metadata: NotRequired[RetrieverModelMetadataTypedDict]
37
+ cache_config: NotRequired[Nullable[RetrieverCacheConfigTypedDict]]
38
+ r"""Configuration for retriever-level caching"""
39
+
40
+
41
+ class RetrieverModel(BaseModel):
42
+ r"""Definition of a retriever"""
43
+
44
+ retriever_name: str
45
+ r"""Name of the retriever"""
46
+
47
+ input_schema: BucketSchemaOutput
48
+ r"""Schema definition for bucket objects"""
49
+
50
+ collection_ids: List[str]
51
+ r"""List of collection IDs to search in"""
52
+
53
+ stages: List[StageConfigOutput]
54
+ r"""List of stages to execute in order"""
55
+
56
+ retriever_id: Optional[str] = None
57
+ r"""Unique identifier for the retriever"""
58
+
59
+ description: OptionalNullable[str] = UNSET
60
+ r"""Description of the retriever"""
61
+
62
+ metadata: Optional[RetrieverModelMetadata] = None
63
+
64
+ cache_config: OptionalNullable[RetrieverCacheConfig] = UNSET
65
+ r"""Configuration for retriever-level caching"""
66
+
67
+ @model_serializer(mode="wrap")
68
+ def serialize_model(self, handler):
69
+ optional_fields = ["retriever_id", "description", "metadata", "cache_config"]
70
+ nullable_fields = ["description", "cache_config"]
71
+ null_default_fields = []
72
+
73
+ serialized = handler(self)
74
+
75
+ m = {}
76
+
77
+ for n, f in type(self).model_fields.items():
78
+ k = f.alias or n
79
+ val = serialized.get(k)
80
+ serialized.pop(k, None)
81
+
82
+ optional_nullable = k in optional_fields and k in nullable_fields
83
+ is_set = (
84
+ self.__pydantic_fields_set__.intersection({n})
85
+ or k in null_default_fields
86
+ ) # pylint: disable=no-member
87
+
88
+ if val is not None and val != UNSET_SENTINEL:
89
+ m[k] = val
90
+ elif val != UNSET_SENTINEL and (
91
+ not k in optional_fields or (optional_nullable and is_set)
92
+ ):
93
+ m[k] = val
94
+
95
+ return m
@@ -0,0 +1,114 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .logicaloperator_input import LogicalOperatorInput, LogicalOperatorInputTypedDict
5
+ from .sortoption import SortOption, SortOptionTypedDict
6
+ from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
7
+ from pydantic import model_serializer
8
+ from typing import List, Optional
9
+ from typing_extensions import NotRequired, TypedDict
10
+
11
+
12
+ class RetrieverQueryRequestInputsTypedDict(TypedDict):
13
+ r"""Input values for the retriever query. These map to the required inputs defined in the retriever's first stage."""
14
+
15
+
16
+ class RetrieverQueryRequestInputs(BaseModel):
17
+ r"""Input values for the retriever query. These map to the required inputs defined in the retriever's first stage."""
18
+
19
+
20
+ class RetrieverQueryRequestTypedDict(TypedDict):
21
+ r"""Query parameters for executing a retriever pipeline.
22
+
23
+ This model defines all the parameters that can be provided when running a
24
+ search using a predefined retriever pipeline. It allows for customizing the
25
+ query inputs, filtering, sorting, pagination, and result formatting.
26
+ """
27
+
28
+ inputs: RetrieverQueryRequestInputsTypedDict
29
+ r"""Input values for the retriever query. These map to the required inputs defined in the retriever's first stage."""
30
+ filters: NotRequired[Nullable[LogicalOperatorInputTypedDict]]
31
+ r"""Logical operations for filtering results. Can include AND, OR, NOT conditions with field comparisons."""
32
+ sorts: NotRequired[Nullable[List[SortOptionTypedDict]]]
33
+ r"""Controls the ordering of results. Can sort by score (default) or any other document field. This sorts the results from the last stage."""
34
+ limit: NotRequired[int]
35
+ r"""Maximum number of results to return. Overrides the default pagination limit in the retriever definition."""
36
+ offset: NotRequired[int]
37
+ r"""Number of results to skip. Use with limit for pagination. For large offsets, consider using session_id for cursor-based pagination."""
38
+ select: NotRequired[Nullable[List[str]]]
39
+ r"""Specific fields to include in the response. If not specified, returns all fields."""
40
+ session_id: NotRequired[Nullable[str]]
41
+ r"""Session identifier for interaction tracking."""
42
+ return_urls: NotRequired[bool]
43
+ r"""When true, generates pre-signed URLs for any media assets in the results. May increase response time slightly."""
44
+
45
+
46
+ class RetrieverQueryRequest(BaseModel):
47
+ r"""Query parameters for executing a retriever pipeline.
48
+
49
+ This model defines all the parameters that can be provided when running a
50
+ search using a predefined retriever pipeline. It allows for customizing the
51
+ query inputs, filtering, sorting, pagination, and result formatting.
52
+ """
53
+
54
+ inputs: RetrieverQueryRequestInputs
55
+ r"""Input values for the retriever query. These map to the required inputs defined in the retriever's first stage."""
56
+
57
+ filters: OptionalNullable[LogicalOperatorInput] = UNSET
58
+ r"""Logical operations for filtering results. Can include AND, OR, NOT conditions with field comparisons."""
59
+
60
+ sorts: OptionalNullable[List[SortOption]] = UNSET
61
+ r"""Controls the ordering of results. Can sort by score (default) or any other document field. This sorts the results from the last stage."""
62
+
63
+ limit: Optional[int] = 10
64
+ r"""Maximum number of results to return. Overrides the default pagination limit in the retriever definition."""
65
+
66
+ offset: Optional[int] = 0
67
+ r"""Number of results to skip. Use with limit for pagination. For large offsets, consider using session_id for cursor-based pagination."""
68
+
69
+ select: OptionalNullable[List[str]] = UNSET
70
+ r"""Specific fields to include in the response. If not specified, returns all fields."""
71
+
72
+ session_id: OptionalNullable[str] = UNSET
73
+ r"""Session identifier for interaction tracking."""
74
+
75
+ return_urls: Optional[bool] = False
76
+ r"""When true, generates pre-signed URLs for any media assets in the results. May increase response time slightly."""
77
+
78
+ @model_serializer(mode="wrap")
79
+ def serialize_model(self, handler):
80
+ optional_fields = [
81
+ "filters",
82
+ "sorts",
83
+ "limit",
84
+ "offset",
85
+ "select",
86
+ "session_id",
87
+ "return_urls",
88
+ ]
89
+ nullable_fields = ["filters", "sorts", "select", "session_id"]
90
+ null_default_fields = []
91
+
92
+ serialized = handler(self)
93
+
94
+ m = {}
95
+
96
+ for n, f in type(self).model_fields.items():
97
+ k = f.alias or n
98
+ val = serialized.get(k)
99
+ serialized.pop(k, None)
100
+
101
+ optional_nullable = k in optional_fields and k in nullable_fields
102
+ is_set = (
103
+ self.__pydantic_fields_set__.intersection({n})
104
+ or k in null_default_fields
105
+ ) # pylint: disable=no-member
106
+
107
+ if val is not None and val != UNSET_SENTINEL:
108
+ m[k] = val
109
+ elif val != UNSET_SENTINEL and (
110
+ not k in optional_fields or (optional_nullable and is_set)
111
+ ):
112
+ m[k] = val
113
+
114
+ return m
@@ -0,0 +1,24 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .stageresponse import StageResponse, StageResponseTypedDict
5
+ from mixpeek.types import BaseModel
6
+ from typing import List, Optional
7
+ from typing_extensions import NotRequired, TypedDict
8
+
9
+
10
+ class RetrieverResponseTypedDict(TypedDict):
11
+ r"""Response from a retriever execution"""
12
+
13
+ execution_time: float
14
+ stage_results: NotRequired[List[StageResponseTypedDict]]
15
+ r"""Results from each stage execution"""
16
+
17
+
18
+ class RetrieverResponse(BaseModel):
19
+ r"""Response from a retriever execution"""
20
+
21
+ execution_time: float
22
+
23
+ stage_results: Optional[List[StageResponse]] = None
24
+ r"""Results from each stage execution"""