mixpeek 0.11.2__py3-none-any.whl → 0.13__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/__init__.py +9 -1
- mixpeek/_hooks/__init__.py +5 -0
- mixpeek/_hooks/registration.py +13 -0
- mixpeek/_hooks/sdkhooks.py +76 -0
- mixpeek/_hooks/types.py +94 -0
- mixpeek/_version.py +12 -0
- mixpeek/assets.py +1561 -0
- mixpeek/basesdk.py +350 -0
- mixpeek/collections.py +1029 -0
- mixpeek/featureextractors.py +205 -0
- mixpeek/features.py +1181 -0
- mixpeek/health.py +167 -0
- mixpeek/httpclient.py +84 -0
- mixpeek/ingest.py +831 -0
- mixpeek/interactions.py +221 -0
- mixpeek/models/__init__.py +751 -0
- mixpeek/models/actionusage.py +16 -0
- mixpeek/models/apierror.py +22 -0
- mixpeek/models/apikey.py +25 -0
- mixpeek/models/apikeyupdate.py +49 -0
- mixpeek/models/assetfeatures.py +55 -0
- mixpeek/models/assetresponse.py +166 -0
- mixpeek/models/assets_model_searchquery.py +21 -0
- mixpeek/models/assetupdate.py +28 -0
- mixpeek/models/availableindexesresponse.py +23 -0
- mixpeek/models/availablemodels.py +12 -0
- mixpeek/models/boolindexparams.py +18 -0
- mixpeek/models/collectionmodel.py +70 -0
- mixpeek/models/collectionresult.py +73 -0
- mixpeek/models/create_api_key_organizations_users_user_email_api_keys_postop.py +23 -0
- mixpeek/models/create_collection_collections_postop.py +62 -0
- mixpeek/models/create_interaction_features_search_interactions_postop.py +59 -0
- mixpeek/models/createcollectionrequest.py +59 -0
- mixpeek/models/createnamespacerequest.py +62 -0
- mixpeek/models/datetimeindexparams.py +18 -0
- mixpeek/models/dateusage.py +22 -0
- mixpeek/models/db_model_paginationresponse.py +59 -0
- mixpeek/models/db_model_taskresponse.py +20 -0
- mixpeek/models/delete_api_key_organizations_users_user_email_api_keys_key_name_deleteop.py +23 -0
- mixpeek/models/delete_asset_assets_asset_id_deleteop.py +57 -0
- mixpeek/models/delete_collection_collections_collection_deleteop.py +59 -0
- mixpeek/models/delete_feature_features_feature_id_deleteop.py +57 -0
- mixpeek/models/delete_interaction_features_search_interactions_interaction_id_deleteop.py +59 -0
- mixpeek/models/delete_namespace_namespaces_namespace_deleteop.py +18 -0
- mixpeek/models/delete_user_organizations_users_user_email_deleteop.py +16 -0
- mixpeek/models/denseembedding.py +16 -0
- mixpeek/models/embeddingrequest.py +59 -0
- mixpeek/models/embeddingresponse.py +64 -0
- mixpeek/models/errormessage.py +13 -0
- mixpeek/models/errorresponse.py +21 -0
- mixpeek/models/facedetectsettings.py +52 -0
- mixpeek/models/featureextractionembeddingrequest.py +54 -0
- mixpeek/models/featureresponse.py +74 -0
- mixpeek/models/features_model_paginationresponse.py +59 -0
- mixpeek/models/featureupdaterequest.py +21 -0
- mixpeek/models/filtercondition.py +74 -0
- mixpeek/models/floatindexparams.py +18 -0
- mixpeek/models/full_asset_update_assets_asset_id_putop.py +69 -0
- mixpeek/models/full_feature_update_features_feature_id_putop.py +69 -0
- mixpeek/models/geoindexparams.py +18 -0
- mixpeek/models/get_asset_assets_asset_id_getop.py +73 -0
- mixpeek/models/get_asset_with_features_assets_asset_id_features_getop.py +73 -0
- mixpeek/models/get_collection_collections_collection_getop.py +59 -0
- mixpeek/models/get_feature_features_feature_id_getop.py +70 -0
- mixpeek/models/get_interaction_features_search_interactions_interaction_id_getop.py +59 -0
- mixpeek/models/get_namespace_namespaces_namespace_getop.py +18 -0
- mixpeek/models/get_task_tasks_task_id_getop.py +57 -0
- mixpeek/models/get_user_organizations_users_user_email_getop.py +16 -0
- mixpeek/models/groupbyoptions.py +71 -0
- mixpeek/models/groupbyoptionsasset.py +71 -0
- mixpeek/models/groupedassetdata.py +18 -0
- mixpeek/models/healthcheckresponse.py +13 -0
- mixpeek/models/httpvalidationerror.py +21 -0
- mixpeek/models/imagedescribesettings.py +82 -0
- mixpeek/models/imagedetectsettings.py +53 -0
- mixpeek/models/imagereadsettings.py +71 -0
- mixpeek/models/imagesettings.py +79 -0
- mixpeek/models/ingest_image_url_ingest_images_url_postop.py +59 -0
- mixpeek/models/ingest_text_ingest_text_postop.py +59 -0
- mixpeek/models/ingest_video_url_ingest_videos_url_postop.py +59 -0
- mixpeek/models/inputtype.py +11 -0
- mixpeek/models/integerindexparams.py +24 -0
- mixpeek/models/interactionresponse.py +87 -0
- mixpeek/models/interactiontype.py +11 -0
- mixpeek/models/jsonimageoutputsettings.py +55 -0
- mixpeek/models/jsontextoutputsettings.py +55 -0
- mixpeek/models/jsonvideooutputsettings.py +55 -0
- mixpeek/models/keywordindexparams.py +21 -0
- mixpeek/models/kill_task_tasks_task_id_deleteop.py +57 -0
- mixpeek/models/list_assets_assets_postop.py +77 -0
- mixpeek/models/list_collections_collections_getop.py +65 -0
- mixpeek/models/list_features_features_postop.py +79 -0
- mixpeek/models/list_interactions_features_search_interactions_getop.py +96 -0
- mixpeek/models/listassetsrequest.py +75 -0
- mixpeek/models/listassetsresponse.py +22 -0
- mixpeek/models/listcollectionsresponse.py +22 -0
- mixpeek/models/listfeaturesrequest.py +77 -0
- mixpeek/models/listfeaturesresponse.py +22 -0
- mixpeek/models/logicaloperator_input.py +88 -0
- mixpeek/models/logicaloperator_output.py +103 -0
- mixpeek/models/logodetectsettings.py +52 -0
- mixpeek/models/modality.py +13 -0
- mixpeek/models/modeldetails.py +57 -0
- mixpeek/models/namespaceresponse.py +54 -0
- mixpeek/models/organizationmodel.py +45 -0
- mixpeek/models/partial_asset_update_assets_asset_id_patchop.py +69 -0
- mixpeek/models/payloadindexconfig.py +94 -0
- mixpeek/models/payloadindextype.py +17 -0
- mixpeek/models/payloadschematype.py +15 -0
- mixpeek/models/percolaterequest.py +57 -0
- mixpeek/models/permission.py +10 -0
- mixpeek/models/processimageurlinput.py +99 -0
- mixpeek/models/processtextinput.py +94 -0
- mixpeek/models/processvideourlinput.py +99 -0
- mixpeek/models/querysettings.py +56 -0
- mixpeek/models/rerankingoptions.py +47 -0
- mixpeek/models/search_assets_assets_search_postop.py +59 -0
- mixpeek/models/search_features_features_search_postop.py +96 -0
- mixpeek/models/search_model_searchquery_input.py +76 -0
- mixpeek/models/searchassetsrequest.py +78 -0
- mixpeek/models/searchinteraction.py +82 -0
- mixpeek/models/searchquery_output.py +79 -0
- mixpeek/models/searchrequestfeatures_input.py +151 -0
- mixpeek/models/searchrequestfeatures_output.py +151 -0
- mixpeek/models/sortoption.py +28 -0
- mixpeek/models/sparseembedding.py +21 -0
- mixpeek/models/tasks_model_taskresponse.py +24 -0
- mixpeek/models/taskstatus.py +16 -0
- mixpeek/models/textindexparams.py +31 -0
- mixpeek/models/textsettings.py +61 -0
- mixpeek/models/tokenizertype.py +11 -0
- mixpeek/models/update_api_key_organizations_users_user_email_api_keys_key_name_patchop.py +30 -0
- mixpeek/models/update_collection_collections_collection_putop.py +74 -0
- mixpeek/models/update_namespace_namespaces_namespace_putop.py +28 -0
- mixpeek/models/updateassetrequest.py +60 -0
- mixpeek/models/updatenamespacerequest.py +26 -0
- mixpeek/models/usage.py +18 -0
- mixpeek/models/usermodel_input.py +36 -0
- mixpeek/models/usermodel_output.py +36 -0
- mixpeek/models/uuidindexparams.py +21 -0
- mixpeek/models/validationerror.py +26 -0
- mixpeek/models/vectormodel.py +11 -0
- mixpeek/models/vectortype.py +9 -0
- mixpeek/models/videodescribesettings.py +82 -0
- mixpeek/models/videodetectsettings.py +53 -0
- mixpeek/models/videoreadsettings.py +71 -0
- mixpeek/models/videosettings.py +101 -0
- mixpeek/models/videotranscriptionsettings.py +69 -0
- mixpeek/namespaces.py +1143 -0
- mixpeek/organizations.py +1508 -0
- mixpeek/py.typed +1 -0
- mixpeek/sdk.py +135 -0
- mixpeek/sdkconfiguration.py +45 -0
- mixpeek/searchinteractions.py +647 -0
- mixpeek/tasks.py +387 -0
- mixpeek/types/__init__.py +21 -0
- mixpeek/types/basemodel.py +39 -0
- mixpeek/utils/__init__.py +97 -0
- mixpeek/utils/annotations.py +55 -0
- mixpeek/utils/enums.py +34 -0
- mixpeek/utils/eventstreaming.py +238 -0
- mixpeek/utils/forms.py +202 -0
- mixpeek/utils/headers.py +136 -0
- mixpeek/utils/logger.py +27 -0
- mixpeek/utils/metadata.py +118 -0
- mixpeek/utils/queryparams.py +205 -0
- mixpeek/utils/requestbodies.py +66 -0
- mixpeek/utils/retries.py +217 -0
- mixpeek/utils/security.py +174 -0
- mixpeek/utils/serializers.py +215 -0
- mixpeek/utils/url.py +155 -0
- mixpeek/utils/values.py +134 -0
- mixpeek-0.13.dist-info/METADATA +439 -0
- mixpeek-0.13.dist-info/RECORD +176 -0
- {mixpeek-0.11.2.dist-info → mixpeek-0.13.dist-info}/WHEEL +1 -2
- py.typed +1 -0
- mixpeek/client.py +0 -27
- mixpeek/endpoints/__init__.py +0 -0
- mixpeek/endpoints/collections.py +0 -86
- mixpeek/endpoints/embed.py +0 -66
- mixpeek/endpoints/index.py +0 -51
- mixpeek/endpoints/register.py +0 -34
- mixpeek/endpoints/search.py +0 -44
- mixpeek/endpoints/tasks.py +0 -26
- mixpeek/endpoints/tools.py +0 -138
- mixpeek/exceptions.py +0 -13
- mixpeek-0.11.2.dist-info/METADATA +0 -375
- mixpeek-0.11.2.dist-info/RECORD +0 -15
- mixpeek-0.11.2.dist-info/top_level.txt +0 -1
@@ -0,0 +1,17 @@
|
|
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 PayloadIndexTypeTypedDict(TypedDict):
|
9
|
+
r"""Simple schema for payload index type"""
|
10
|
+
|
11
|
+
type: str
|
12
|
+
|
13
|
+
|
14
|
+
class PayloadIndexType(BaseModel):
|
15
|
+
r"""Simple schema for payload index type"""
|
16
|
+
|
17
|
+
type: str
|
@@ -0,0 +1,15 @@
|
|
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 PayloadSchemaType(str, Enum):
|
8
|
+
KEYWORD = "keyword"
|
9
|
+
INTEGER = "integer"
|
10
|
+
FLOAT = "float"
|
11
|
+
BOOL = "bool"
|
12
|
+
GEO = "geo"
|
13
|
+
DATETIME = "datetime"
|
14
|
+
TEXT = "text"
|
15
|
+
UUID = "uuid"
|
@@ -0,0 +1,57 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
5
|
+
from pydantic import model_serializer
|
6
|
+
from typing import Optional
|
7
|
+
from typing_extensions import NotRequired, TypedDict
|
8
|
+
|
9
|
+
|
10
|
+
class PercolateRequestTypedDict(TypedDict):
|
11
|
+
enabled: NotRequired[bool]
|
12
|
+
r"""Whether to enable percolator matching for this request"""
|
13
|
+
min_score: NotRequired[Nullable[float]]
|
14
|
+
r"""Minimum similarity score (0-1) required for a match. Higher values mean stricter matching."""
|
15
|
+
max_candidates: NotRequired[Nullable[int]]
|
16
|
+
r"""Maximum number of matching percolators to return in the response"""
|
17
|
+
|
18
|
+
|
19
|
+
class PercolateRequest(BaseModel):
|
20
|
+
enabled: Optional[bool] = True
|
21
|
+
r"""Whether to enable percolator matching for this request"""
|
22
|
+
|
23
|
+
min_score: OptionalNullable[float] = UNSET
|
24
|
+
r"""Minimum similarity score (0-1) required for a match. Higher values mean stricter matching."""
|
25
|
+
|
26
|
+
max_candidates: OptionalNullable[int] = UNSET
|
27
|
+
r"""Maximum number of matching percolators to return in the response"""
|
28
|
+
|
29
|
+
@model_serializer(mode="wrap")
|
30
|
+
def serialize_model(self, handler):
|
31
|
+
optional_fields = ["enabled", "min_score", "max_candidates"]
|
32
|
+
nullable_fields = ["min_score", "max_candidates"]
|
33
|
+
null_default_fields = []
|
34
|
+
|
35
|
+
serialized = handler(self)
|
36
|
+
|
37
|
+
m = {}
|
38
|
+
|
39
|
+
for n, f in self.model_fields.items():
|
40
|
+
k = f.alias or n
|
41
|
+
val = serialized.get(k)
|
42
|
+
serialized.pop(k, None)
|
43
|
+
|
44
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
45
|
+
is_set = (
|
46
|
+
self.__pydantic_fields_set__.intersection({n})
|
47
|
+
or k in null_default_fields
|
48
|
+
) # pylint: disable=no-member
|
49
|
+
|
50
|
+
if val is not None and val != UNSET_SENTINEL:
|
51
|
+
m[k] = val
|
52
|
+
elif val != UNSET_SENTINEL and (
|
53
|
+
not k in optional_fields or (optional_nullable and is_set)
|
54
|
+
):
|
55
|
+
m[k] = val
|
56
|
+
|
57
|
+
return m
|
@@ -0,0 +1,99 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from .assetupdate import AssetUpdate, AssetUpdateTypedDict
|
5
|
+
from .imagesettings import ImageSettings, ImageSettingsTypedDict
|
6
|
+
from .percolaterequest import PercolateRequest, PercolateRequestTypedDict
|
7
|
+
from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
8
|
+
from pydantic import model_serializer
|
9
|
+
from typing import Optional
|
10
|
+
from typing_extensions import NotRequired, TypedDict
|
11
|
+
|
12
|
+
|
13
|
+
class ProcessImageURLInputMetadataTypedDict(TypedDict):
|
14
|
+
r"""Additional metadata associated with the asset. Can include any key-value pairs relevant to the asset."""
|
15
|
+
|
16
|
+
|
17
|
+
class ProcessImageURLInputMetadata(BaseModel):
|
18
|
+
r"""Additional metadata associated with the asset. Can include any key-value pairs relevant to the asset."""
|
19
|
+
|
20
|
+
|
21
|
+
class ProcessImageURLInputTypedDict(TypedDict):
|
22
|
+
url: str
|
23
|
+
r"""The URL of the asset to be processed. Must be a valid HTTP or HTTPS URL."""
|
24
|
+
collection: str
|
25
|
+
r"""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."""
|
26
|
+
asset_update: NotRequired[Nullable[AssetUpdateTypedDict]]
|
27
|
+
r"""Controls how processing results are stored - either creating a new asset or updating an existing one."""
|
28
|
+
metadata: NotRequired[ProcessImageURLInputMetadataTypedDict]
|
29
|
+
r"""Additional metadata associated with the asset. Can include any key-value pairs relevant to the asset."""
|
30
|
+
percolate: NotRequired[Nullable[PercolateRequestTypedDict]]
|
31
|
+
r"""Settings for percolating the asset against stored queries."""
|
32
|
+
skip_duplicate: NotRequired[Nullable[bool]]
|
33
|
+
r"""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."""
|
34
|
+
feature_extractors: NotRequired[Nullable[ImageSettingsTypedDict]]
|
35
|
+
r"""Settings for image processing. Only applicable if the URL points to an image file."""
|
36
|
+
|
37
|
+
|
38
|
+
class ProcessImageURLInput(BaseModel):
|
39
|
+
url: str
|
40
|
+
r"""The URL of the asset to be processed. Must be a valid HTTP or HTTPS URL."""
|
41
|
+
|
42
|
+
collection: str
|
43
|
+
r"""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."""
|
44
|
+
|
45
|
+
asset_update: OptionalNullable[AssetUpdate] = UNSET
|
46
|
+
r"""Controls how processing results are stored - either creating a new asset or updating an existing one."""
|
47
|
+
|
48
|
+
metadata: Optional[ProcessImageURLInputMetadata] = None
|
49
|
+
r"""Additional metadata associated with the asset. Can include any key-value pairs relevant to the asset."""
|
50
|
+
|
51
|
+
percolate: OptionalNullable[PercolateRequest] = UNSET
|
52
|
+
r"""Settings for percolating the asset against stored queries."""
|
53
|
+
|
54
|
+
skip_duplicate: OptionalNullable[bool] = UNSET
|
55
|
+
r"""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."""
|
56
|
+
|
57
|
+
feature_extractors: OptionalNullable[ImageSettings] = UNSET
|
58
|
+
r"""Settings for image processing. Only applicable if the URL points to an image file."""
|
59
|
+
|
60
|
+
@model_serializer(mode="wrap")
|
61
|
+
def serialize_model(self, handler):
|
62
|
+
optional_fields = [
|
63
|
+
"asset_update",
|
64
|
+
"metadata",
|
65
|
+
"percolate",
|
66
|
+
"skip_duplicate",
|
67
|
+
"feature_extractors",
|
68
|
+
]
|
69
|
+
nullable_fields = [
|
70
|
+
"asset_update",
|
71
|
+
"percolate",
|
72
|
+
"skip_duplicate",
|
73
|
+
"feature_extractors",
|
74
|
+
]
|
75
|
+
null_default_fields = []
|
76
|
+
|
77
|
+
serialized = handler(self)
|
78
|
+
|
79
|
+
m = {}
|
80
|
+
|
81
|
+
for n, f in self.model_fields.items():
|
82
|
+
k = f.alias or n
|
83
|
+
val = serialized.get(k)
|
84
|
+
serialized.pop(k, None)
|
85
|
+
|
86
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
87
|
+
is_set = (
|
88
|
+
self.__pydantic_fields_set__.intersection({n})
|
89
|
+
or k in null_default_fields
|
90
|
+
) # pylint: disable=no-member
|
91
|
+
|
92
|
+
if val is not None and val != UNSET_SENTINEL:
|
93
|
+
m[k] = val
|
94
|
+
elif val != UNSET_SENTINEL and (
|
95
|
+
not k in optional_fields or (optional_nullable and is_set)
|
96
|
+
):
|
97
|
+
m[k] = val
|
98
|
+
|
99
|
+
return m
|
@@ -0,0 +1,94 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from .assetupdate import AssetUpdate, AssetUpdateTypedDict
|
5
|
+
from .percolaterequest import PercolateRequest, PercolateRequestTypedDict
|
6
|
+
from .textsettings import TextSettings, TextSettingsTypedDict
|
7
|
+
from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
8
|
+
from pydantic import model_serializer
|
9
|
+
from typing import Optional
|
10
|
+
from typing_extensions import NotRequired, TypedDict
|
11
|
+
|
12
|
+
|
13
|
+
class ProcessTextInputMetadataTypedDict(TypedDict):
|
14
|
+
r"""Additional metadata associated with the file. Can include any key-value pairs relevant to the file."""
|
15
|
+
|
16
|
+
|
17
|
+
class ProcessTextInputMetadata(BaseModel):
|
18
|
+
r"""Additional metadata associated with the file. Can include any key-value pairs relevant to the file."""
|
19
|
+
|
20
|
+
|
21
|
+
class ProcessTextInputTypedDict(TypedDict):
|
22
|
+
collection: str
|
23
|
+
r"""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."""
|
24
|
+
asset_update: NotRequired[Nullable[AssetUpdateTypedDict]]
|
25
|
+
r"""Controls how processing results are stored - either creating a new asset or updating an existing one."""
|
26
|
+
metadata: NotRequired[ProcessTextInputMetadataTypedDict]
|
27
|
+
r"""Additional metadata associated with the file. Can include any key-value pairs relevant to the file."""
|
28
|
+
feature_extractors: NotRequired[Nullable[TextSettingsTypedDict]]
|
29
|
+
r"""Settings for text processing."""
|
30
|
+
percolate: NotRequired[Nullable[PercolateRequestTypedDict]]
|
31
|
+
r"""Settings for percolating the asset against stored queries."""
|
32
|
+
skip_duplicate: NotRequired[Nullable[bool]]
|
33
|
+
r"""Skips processing when a duplicate hash is found and stores an error by the task_id with the existing asset_id"""
|
34
|
+
|
35
|
+
|
36
|
+
class ProcessTextInput(BaseModel):
|
37
|
+
collection: str
|
38
|
+
r"""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."""
|
39
|
+
|
40
|
+
asset_update: OptionalNullable[AssetUpdate] = UNSET
|
41
|
+
r"""Controls how processing results are stored - either creating a new asset or updating an existing one."""
|
42
|
+
|
43
|
+
metadata: Optional[ProcessTextInputMetadata] = None
|
44
|
+
r"""Additional metadata associated with the file. Can include any key-value pairs relevant to the file."""
|
45
|
+
|
46
|
+
feature_extractors: OptionalNullable[TextSettings] = UNSET
|
47
|
+
r"""Settings for text processing."""
|
48
|
+
|
49
|
+
percolate: OptionalNullable[PercolateRequest] = UNSET
|
50
|
+
r"""Settings for percolating the asset against stored queries."""
|
51
|
+
|
52
|
+
skip_duplicate: OptionalNullable[bool] = UNSET
|
53
|
+
r"""Skips processing when a duplicate hash is found and stores an error by the task_id with the existing asset_id"""
|
54
|
+
|
55
|
+
@model_serializer(mode="wrap")
|
56
|
+
def serialize_model(self, handler):
|
57
|
+
optional_fields = [
|
58
|
+
"asset_update",
|
59
|
+
"metadata",
|
60
|
+
"feature_extractors",
|
61
|
+
"percolate",
|
62
|
+
"skip_duplicate",
|
63
|
+
]
|
64
|
+
nullable_fields = [
|
65
|
+
"asset_update",
|
66
|
+
"feature_extractors",
|
67
|
+
"percolate",
|
68
|
+
"skip_duplicate",
|
69
|
+
]
|
70
|
+
null_default_fields = []
|
71
|
+
|
72
|
+
serialized = handler(self)
|
73
|
+
|
74
|
+
m = {}
|
75
|
+
|
76
|
+
for n, f in self.model_fields.items():
|
77
|
+
k = f.alias or n
|
78
|
+
val = serialized.get(k)
|
79
|
+
serialized.pop(k, None)
|
80
|
+
|
81
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
82
|
+
is_set = (
|
83
|
+
self.__pydantic_fields_set__.intersection({n})
|
84
|
+
or k in null_default_fields
|
85
|
+
) # pylint: disable=no-member
|
86
|
+
|
87
|
+
if val is not None and val != UNSET_SENTINEL:
|
88
|
+
m[k] = val
|
89
|
+
elif val != UNSET_SENTINEL and (
|
90
|
+
not k in optional_fields or (optional_nullable and is_set)
|
91
|
+
):
|
92
|
+
m[k] = val
|
93
|
+
|
94
|
+
return m
|
@@ -0,0 +1,99 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from .assetupdate import AssetUpdate, AssetUpdateTypedDict
|
5
|
+
from .percolaterequest import PercolateRequest, PercolateRequestTypedDict
|
6
|
+
from .videosettings import VideoSettings, VideoSettingsTypedDict
|
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 ProcessVideoURLInputMetadataTypedDict(TypedDict):
|
14
|
+
r"""Additional metadata associated with the asset. Can include any key-value pairs relevant to the asset."""
|
15
|
+
|
16
|
+
|
17
|
+
class ProcessVideoURLInputMetadata(BaseModel):
|
18
|
+
r"""Additional metadata associated with the asset. Can include any key-value pairs relevant to the asset."""
|
19
|
+
|
20
|
+
|
21
|
+
class ProcessVideoURLInputTypedDict(TypedDict):
|
22
|
+
url: str
|
23
|
+
r"""The URL of the asset to be processed. Must be a valid HTTP or HTTPS URL."""
|
24
|
+
collection: str
|
25
|
+
r"""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."""
|
26
|
+
asset_update: NotRequired[Nullable[AssetUpdateTypedDict]]
|
27
|
+
r"""Controls how processing results are stored - either creating a new asset or updating an existing one."""
|
28
|
+
metadata: NotRequired[ProcessVideoURLInputMetadataTypedDict]
|
29
|
+
r"""Additional metadata associated with the asset. Can include any key-value pairs relevant to the asset."""
|
30
|
+
percolate: NotRequired[Nullable[PercolateRequestTypedDict]]
|
31
|
+
r"""Settings for percolating the asset against stored queries."""
|
32
|
+
skip_duplicate: NotRequired[Nullable[bool]]
|
33
|
+
r"""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."""
|
34
|
+
feature_extractors: NotRequired[Nullable[List[VideoSettingsTypedDict]]]
|
35
|
+
r"""Settings for video processing. Only applicable if the URL points to a video file."""
|
36
|
+
|
37
|
+
|
38
|
+
class ProcessVideoURLInput(BaseModel):
|
39
|
+
url: str
|
40
|
+
r"""The URL of the asset to be processed. Must be a valid HTTP or HTTPS URL."""
|
41
|
+
|
42
|
+
collection: str
|
43
|
+
r"""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."""
|
44
|
+
|
45
|
+
asset_update: OptionalNullable[AssetUpdate] = UNSET
|
46
|
+
r"""Controls how processing results are stored - either creating a new asset or updating an existing one."""
|
47
|
+
|
48
|
+
metadata: Optional[ProcessVideoURLInputMetadata] = None
|
49
|
+
r"""Additional metadata associated with the asset. Can include any key-value pairs relevant to the asset."""
|
50
|
+
|
51
|
+
percolate: OptionalNullable[PercolateRequest] = UNSET
|
52
|
+
r"""Settings for percolating the asset against stored queries."""
|
53
|
+
|
54
|
+
skip_duplicate: OptionalNullable[bool] = UNSET
|
55
|
+
r"""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."""
|
56
|
+
|
57
|
+
feature_extractors: OptionalNullable[List[VideoSettings]] = UNSET
|
58
|
+
r"""Settings for video processing. Only applicable if the URL points to a video file."""
|
59
|
+
|
60
|
+
@model_serializer(mode="wrap")
|
61
|
+
def serialize_model(self, handler):
|
62
|
+
optional_fields = [
|
63
|
+
"asset_update",
|
64
|
+
"metadata",
|
65
|
+
"percolate",
|
66
|
+
"skip_duplicate",
|
67
|
+
"feature_extractors",
|
68
|
+
]
|
69
|
+
nullable_fields = [
|
70
|
+
"asset_update",
|
71
|
+
"percolate",
|
72
|
+
"skip_duplicate",
|
73
|
+
"feature_extractors",
|
74
|
+
]
|
75
|
+
null_default_fields = []
|
76
|
+
|
77
|
+
serialized = handler(self)
|
78
|
+
|
79
|
+
m = {}
|
80
|
+
|
81
|
+
for n, f in self.model_fields.items():
|
82
|
+
k = f.alias or n
|
83
|
+
val = serialized.get(k)
|
84
|
+
serialized.pop(k, None)
|
85
|
+
|
86
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
87
|
+
is_set = (
|
88
|
+
self.__pydantic_fields_set__.intersection({n})
|
89
|
+
or k in null_default_fields
|
90
|
+
) # pylint: disable=no-member
|
91
|
+
|
92
|
+
if val is not None and val != UNSET_SENTINEL:
|
93
|
+
m[k] = val
|
94
|
+
elif val != UNSET_SENTINEL and (
|
95
|
+
not k in optional_fields or (optional_nullable and is_set)
|
96
|
+
):
|
97
|
+
m[k] = val
|
98
|
+
|
99
|
+
return m
|
@@ -0,0 +1,56 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
5
|
+
from pydantic import model_serializer
|
6
|
+
from typing_extensions import NotRequired, TypedDict
|
7
|
+
|
8
|
+
|
9
|
+
class QuerySettingsTypedDict(TypedDict):
|
10
|
+
limit: NotRequired[Nullable[int]]
|
11
|
+
r"""Optional limit for number of results per vector index, this is overriden by ?page_size=int if a single query is provided."""
|
12
|
+
min_score: NotRequired[Nullable[float]]
|
13
|
+
r"""Optional score threshold for filtering results"""
|
14
|
+
modality: NotRequired[Nullable[str]]
|
15
|
+
r"""Optional modality override for the query, this is only used for multimodal embeddings"""
|
16
|
+
|
17
|
+
|
18
|
+
class QuerySettings(BaseModel):
|
19
|
+
limit: OptionalNullable[int] = UNSET
|
20
|
+
r"""Optional limit for number of results per vector index, this is overriden by ?page_size=int if a single query is provided."""
|
21
|
+
|
22
|
+
min_score: OptionalNullable[float] = UNSET
|
23
|
+
r"""Optional score threshold for filtering results"""
|
24
|
+
|
25
|
+
modality: OptionalNullable[str] = UNSET
|
26
|
+
r"""Optional modality override for the query, this is only used for multimodal embeddings"""
|
27
|
+
|
28
|
+
@model_serializer(mode="wrap")
|
29
|
+
def serialize_model(self, handler):
|
30
|
+
optional_fields = ["limit", "min_score", "modality"]
|
31
|
+
nullable_fields = ["limit", "min_score", "modality"]
|
32
|
+
null_default_fields = []
|
33
|
+
|
34
|
+
serialized = handler(self)
|
35
|
+
|
36
|
+
m = {}
|
37
|
+
|
38
|
+
for n, f in self.model_fields.items():
|
39
|
+
k = f.alias or n
|
40
|
+
val = serialized.get(k)
|
41
|
+
serialized.pop(k, None)
|
42
|
+
|
43
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
44
|
+
is_set = (
|
45
|
+
self.__pydantic_fields_set__.intersection({n})
|
46
|
+
or k in null_default_fields
|
47
|
+
) # pylint: disable=no-member
|
48
|
+
|
49
|
+
if val is not None and val != UNSET_SENTINEL:
|
50
|
+
m[k] = val
|
51
|
+
elif val != UNSET_SENTINEL and (
|
52
|
+
not k in optional_fields or (optional_nullable and is_set)
|
53
|
+
):
|
54
|
+
m[k] = val
|
55
|
+
|
56
|
+
return m
|
@@ -0,0 +1,47 @@
|
|
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 import Dict, Optional
|
6
|
+
from typing_extensions import NotRequired, TypedDict
|
7
|
+
|
8
|
+
|
9
|
+
class RerankingOptionsTypedDict(TypedDict):
|
10
|
+
weights: NotRequired[Dict[str, float]]
|
11
|
+
r"""
|
12
|
+
Weights to blend different ranking signals. Must sum to 1.0.
|
13
|
+
- feedback: Weight for feedback-based score (positive, negative)
|
14
|
+
- popularity: Weight for user interaction signals (clicks, views)
|
15
|
+
|
16
|
+
"""
|
17
|
+
enable_reranking: NotRequired[bool]
|
18
|
+
r"""
|
19
|
+
Enable interaction-based score adjustments.
|
20
|
+
When enabled, historical interactions will influence ranking:
|
21
|
+
- Positive feedback and clicks boost scores
|
22
|
+
- Negative feedback reduces scores
|
23
|
+
- View duration and skip signals are considered
|
24
|
+
- Adjustments are weighted by recency
|
25
|
+
|
26
|
+
"""
|
27
|
+
|
28
|
+
|
29
|
+
class RerankingOptions(BaseModel):
|
30
|
+
weights: Optional[Dict[str, float]] = None
|
31
|
+
r"""
|
32
|
+
Weights to blend different ranking signals. Must sum to 1.0.
|
33
|
+
- feedback: Weight for feedback-based score (positive, negative)
|
34
|
+
- popularity: Weight for user interaction signals (clicks, views)
|
35
|
+
|
36
|
+
"""
|
37
|
+
|
38
|
+
enable_reranking: Optional[bool] = False
|
39
|
+
r"""
|
40
|
+
Enable interaction-based score adjustments.
|
41
|
+
When enabled, historical interactions will influence ranking:
|
42
|
+
- Positive feedback and clicks boost scores
|
43
|
+
- Negative feedback reduces scores
|
44
|
+
- View duration and skip signals are considered
|
45
|
+
- Adjustments are weighted by recency
|
46
|
+
|
47
|
+
"""
|
@@ -0,0 +1,59 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from .searchassetsrequest import SearchAssetsRequest, SearchAssetsRequestTypedDict
|
5
|
+
from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
6
|
+
from mixpeek.utils import FieldMetadata, HeaderMetadata, RequestMetadata
|
7
|
+
import pydantic
|
8
|
+
from pydantic import model_serializer
|
9
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
10
|
+
|
11
|
+
|
12
|
+
class SearchAssetsAssetsSearchPostRequestTypedDict(TypedDict):
|
13
|
+
search_assets_request: SearchAssetsRequestTypedDict
|
14
|
+
x_namespace: NotRequired[Nullable[str]]
|
15
|
+
r"""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."""
|
16
|
+
|
17
|
+
|
18
|
+
class SearchAssetsAssetsSearchPostRequest(BaseModel):
|
19
|
+
search_assets_request: Annotated[
|
20
|
+
SearchAssetsRequest,
|
21
|
+
FieldMetadata(request=RequestMetadata(media_type="application/json")),
|
22
|
+
]
|
23
|
+
|
24
|
+
x_namespace: Annotated[
|
25
|
+
OptionalNullable[str],
|
26
|
+
pydantic.Field(alias="X-Namespace"),
|
27
|
+
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
28
|
+
] = UNSET
|
29
|
+
r"""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."""
|
30
|
+
|
31
|
+
@model_serializer(mode="wrap")
|
32
|
+
def serialize_model(self, handler):
|
33
|
+
optional_fields = ["X-Namespace"]
|
34
|
+
nullable_fields = ["X-Namespace"]
|
35
|
+
null_default_fields = []
|
36
|
+
|
37
|
+
serialized = handler(self)
|
38
|
+
|
39
|
+
m = {}
|
40
|
+
|
41
|
+
for n, f in self.model_fields.items():
|
42
|
+
k = f.alias or n
|
43
|
+
val = serialized.get(k)
|
44
|
+
serialized.pop(k, None)
|
45
|
+
|
46
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
47
|
+
is_set = (
|
48
|
+
self.__pydantic_fields_set__.intersection({n})
|
49
|
+
or k in null_default_fields
|
50
|
+
) # pylint: disable=no-member
|
51
|
+
|
52
|
+
if val is not None and val != UNSET_SENTINEL:
|
53
|
+
m[k] = val
|
54
|
+
elif val != UNSET_SENTINEL and (
|
55
|
+
not k in optional_fields or (optional_nullable and is_set)
|
56
|
+
):
|
57
|
+
m[k] = val
|
58
|
+
|
59
|
+
return m
|
@@ -0,0 +1,96 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from .searchrequestfeatures_input import (
|
5
|
+
SearchRequestFeaturesInput,
|
6
|
+
SearchRequestFeaturesInputTypedDict,
|
7
|
+
)
|
8
|
+
from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
9
|
+
from mixpeek.utils import (
|
10
|
+
FieldMetadata,
|
11
|
+
HeaderMetadata,
|
12
|
+
QueryParamMetadata,
|
13
|
+
RequestMetadata,
|
14
|
+
)
|
15
|
+
import pydantic
|
16
|
+
from pydantic import model_serializer
|
17
|
+
from typing import Optional
|
18
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
19
|
+
|
20
|
+
|
21
|
+
class SearchFeaturesFeaturesSearchPostRequestTypedDict(TypedDict):
|
22
|
+
search_request_features_input: SearchRequestFeaturesInputTypedDict
|
23
|
+
offset_position: NotRequired[Nullable[int]]
|
24
|
+
r"""The position to start returning results from. Used for pagination. Does not work with group_by"""
|
25
|
+
page_size: NotRequired[int]
|
26
|
+
r"""Number of results to return per page."""
|
27
|
+
x_namespace: NotRequired[Nullable[str]]
|
28
|
+
r"""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."""
|
29
|
+
|
30
|
+
|
31
|
+
class SearchFeaturesFeaturesSearchPostRequest(BaseModel):
|
32
|
+
search_request_features_input: Annotated[
|
33
|
+
SearchRequestFeaturesInput,
|
34
|
+
FieldMetadata(request=RequestMetadata(media_type="application/json")),
|
35
|
+
]
|
36
|
+
|
37
|
+
offset_position: Annotated[
|
38
|
+
OptionalNullable[int],
|
39
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
40
|
+
] = UNSET
|
41
|
+
r"""The position to start returning results from. Used for pagination. Does not work with group_by"""
|
42
|
+
|
43
|
+
page_size: Annotated[
|
44
|
+
Optional[int],
|
45
|
+
FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
|
46
|
+
] = 10
|
47
|
+
r"""Number of results to return per page."""
|
48
|
+
|
49
|
+
x_namespace: Annotated[
|
50
|
+
OptionalNullable[str],
|
51
|
+
pydantic.Field(alias="X-Namespace"),
|
52
|
+
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
53
|
+
] = UNSET
|
54
|
+
r"""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."""
|
55
|
+
|
56
|
+
@model_serializer(mode="wrap")
|
57
|
+
def serialize_model(self, handler):
|
58
|
+
optional_fields = ["offset_position", "page_size", "X-Namespace"]
|
59
|
+
nullable_fields = ["offset_position", "X-Namespace"]
|
60
|
+
null_default_fields = []
|
61
|
+
|
62
|
+
serialized = handler(self)
|
63
|
+
|
64
|
+
m = {}
|
65
|
+
|
66
|
+
for n, f in self.model_fields.items():
|
67
|
+
k = f.alias or n
|
68
|
+
val = serialized.get(k)
|
69
|
+
serialized.pop(k, None)
|
70
|
+
|
71
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
72
|
+
is_set = (
|
73
|
+
self.__pydantic_fields_set__.intersection({n})
|
74
|
+
or k in null_default_fields
|
75
|
+
) # pylint: disable=no-member
|
76
|
+
|
77
|
+
if val is not None and val != UNSET_SENTINEL:
|
78
|
+
m[k] = val
|
79
|
+
elif val != UNSET_SENTINEL and (
|
80
|
+
not k in optional_fields or (optional_nullable and is_set)
|
81
|
+
):
|
82
|
+
m[k] = val
|
83
|
+
|
84
|
+
return m
|
85
|
+
|
86
|
+
|
87
|
+
class SearchFeaturesFeaturesSearchPostResponseSearchFeaturesFeaturesSearchPostTypedDict(
|
88
|
+
TypedDict
|
89
|
+
):
|
90
|
+
r"""Successful Response"""
|
91
|
+
|
92
|
+
|
93
|
+
class SearchFeaturesFeaturesSearchPostResponseSearchFeaturesFeaturesSearchPost(
|
94
|
+
BaseModel
|
95
|
+
):
|
96
|
+
r"""Successful Response"""
|