mixpeek 0.21.7__py3-none-any.whl → 0.22.0__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/_hooks/types.py +7 -0
- mixpeek/_version.py +3 -3
- mixpeek/basesdk.py +12 -20
- mixpeek/bucketobjects.py +19 -37
- mixpeek/buckets.py +19 -31
- mixpeek/clusters.py +2 -0
- mixpeek/collectioncache.py +6 -0
- mixpeek/collections.py +13 -19
- mixpeek/features.py +4 -0
- mixpeek/health.py +2 -0
- mixpeek/httpclient.py +6 -16
- mixpeek/models/__init__.py +752 -583
- mixpeek/models/blobmodel.py +3 -11
- mixpeek/models/bucketcreaterequest.py +3 -11
- mixpeek/models/bucketresponse.py +3 -11
- mixpeek/models/bucketschemafield_input.py +6 -22
- mixpeek/models/bucketschemafield_output.py +6 -22
- mixpeek/models/bucketschemafieldbase.py +81 -0
- mixpeek/models/bucketschemafieldtype.py +1 -0
- mixpeek/models/bucketupdaterequest.py +3 -10
- mixpeek/models/collectionmodel.py +3 -11
- mixpeek/models/createblobrequest.py +3 -11
- mixpeek/models/createcollectionrequest.py +3 -11
- mixpeek/models/createnamespacerequest.py +9 -9
- mixpeek/models/createobjectrequest.py +3 -11
- mixpeek/models/createretrieverrequest.py +8 -16
- mixpeek/models/errordetail.py +3 -10
- mixpeek/models/featureextractorconfig.py +3 -11
- mixpeek/models/featureextractordefinition.py +26 -46
- mixpeek/models/interactionresponse.py +3 -11
- mixpeek/models/internal/__init__.py +35 -1
- mixpeek/models/logicaloperator_input.py +30 -36
- mixpeek/models/logicaloperator_output.py +39 -45
- mixpeek/models/logicaloperatorbase_input.py +74 -0
- mixpeek/models/logicaloperatorbase_output.py +74 -0
- mixpeek/models/namespaceresponse.py +17 -6
- mixpeek/models/namespacestatus.py +10 -0
- mixpeek/models/objectresponse.py +3 -11
- mixpeek/models/organizationmodel.py +3 -11
- mixpeek/models/retrieverbinding.py +3 -10
- mixpeek/models/retrievermodel.py +11 -16
- mixpeek/models/retrieverqueryrequest.py +3 -11
- mixpeek/models/retrieverschema_input.py +37 -0
- mixpeek/models/retrieverschema_output.py +37 -0
- mixpeek/models/retrieverschemafield_input.py +91 -0
- mixpeek/models/retrieverschemafield_output.py +91 -0
- mixpeek/models/searchinteraction.py +3 -11
- mixpeek/models/stageconfig_input.py +8 -16
- mixpeek/models/stageconfig_output.py +8 -16
- mixpeek/models/stagedefinition.py +28 -17
- mixpeek/models/stageresponse.py +3 -11
- mixpeek/models/updateobjectrequest.py +3 -11
- mixpeek/models/usermodel_input.py +3 -11
- mixpeek/models/usermodel_output.py +3 -11
- mixpeek/namespaces.py +28 -22
- mixpeek/organizationnotifications.py +2 -0
- mixpeek/organizations.py +13 -13
- mixpeek/organizationsusage.py +2 -0
- mixpeek/research.py +2 -0
- mixpeek/retrieverinteractions.py +13 -19
- mixpeek/retrievers.py +21 -39
- mixpeek/retrieverstages.py +2 -0
- mixpeek/sdk.py +94 -65
- mixpeek/sdkconfiguration.py +0 -7
- mixpeek/tasks.py +6 -0
- mixpeek/taxonomies.py +2 -0
- mixpeek/users.py +6 -0
- mixpeek/utils/__init__.py +131 -45
- mixpeek/utils/datetimes.py +23 -0
- mixpeek/utils/serializers.py +32 -3
- {mixpeek-0.21.7.dist-info → mixpeek-0.22.0.dist-info}/METADATA +3 -15
- {mixpeek-0.21.7.dist-info → mixpeek-0.22.0.dist-info}/RECORD +73 -75
- {mixpeek-0.21.7.dist-info → mixpeek-0.22.0.dist-info}/WHEEL +1 -1
- mixpeek/collectiondocuments.py +0 -1564
- mixpeek/models/batch_delete_documents_v1_collections_collection_identifier_documents_batch_deleteop.py +0 -75
- mixpeek/models/batch_update_documents_v1_collections_collection_identifier_documents_batch_putop.py +0 -84
- mixpeek/models/delete_document_v1_collections_collection_identifier_documents_document_id_deleteop.py +0 -70
- mixpeek/models/documentlistresponse.py +0 -56
- mixpeek/models/documentresponse.py +0 -87
- mixpeek/models/documentupdate.py +0 -60
- mixpeek/models/genericsuccessresponse.py +0 -17
- mixpeek/models/get_document_v1_collections_collection_identifier_documents_document_id_getop.py +0 -70
- mixpeek/models/list_documents_v1_collections_collection_identifier_documents_getop.py +0 -114
- mixpeek/models/update_document_v1_collections_collection_identifier_documents_document_id_putop.py +0 -83
@@ -7,18 +7,10 @@ from .logicaloperator_output import (
|
|
7
7
|
)
|
8
8
|
from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
9
9
|
from pydantic import model_serializer
|
10
|
-
from typing import Optional
|
10
|
+
from typing import Any, Dict, Optional
|
11
11
|
from typing_extensions import NotRequired, TypedDict
|
12
12
|
|
13
13
|
|
14
|
-
class StageConfigOutputParametersTypedDict(TypedDict):
|
15
|
-
r"""Parameters for the stage"""
|
16
|
-
|
17
|
-
|
18
|
-
class StageConfigOutputParameters(BaseModel):
|
19
|
-
r"""Parameters for the stage"""
|
20
|
-
|
21
|
-
|
22
14
|
class StageConfigOutputTypedDict(TypedDict):
|
23
15
|
r"""Configuration for how a retriever stage processes queries and handles results.
|
24
16
|
|
@@ -27,13 +19,13 @@ class StageConfigOutputTypedDict(TypedDict):
|
|
27
19
|
with consistent options.
|
28
20
|
"""
|
29
21
|
|
22
|
+
stage_id: str
|
23
|
+
r"""Unique identifier for the stage"""
|
30
24
|
stage_name: str
|
31
25
|
r"""Name of the stage"""
|
32
26
|
version: str
|
33
27
|
r"""Version of the stage"""
|
34
|
-
|
35
|
-
r"""Python module path for the stage"""
|
36
|
-
parameters: NotRequired[StageConfigOutputParametersTypedDict]
|
28
|
+
parameters: NotRequired[Dict[str, Any]]
|
37
29
|
r"""Parameters for the stage"""
|
38
30
|
pre_filters: NotRequired[Nullable[LogicalOperatorOutputTypedDict]]
|
39
31
|
r"""Filters to apply before the main search is executed"""
|
@@ -53,16 +45,16 @@ class StageConfigOutput(BaseModel):
|
|
53
45
|
with consistent options.
|
54
46
|
"""
|
55
47
|
|
48
|
+
stage_id: str
|
49
|
+
r"""Unique identifier for the stage"""
|
50
|
+
|
56
51
|
stage_name: str
|
57
52
|
r"""Name of the stage"""
|
58
53
|
|
59
54
|
version: str
|
60
55
|
r"""Version of the stage"""
|
61
56
|
|
62
|
-
|
63
|
-
r"""Python module path for the stage"""
|
64
|
-
|
65
|
-
parameters: Optional[StageConfigOutputParameters] = None
|
57
|
+
parameters: Optional[Dict[str, Any]] = None
|
66
58
|
r"""Parameters for the stage"""
|
67
59
|
|
68
60
|
pre_filters: OptionalNullable[LogicalOperatorOutput] = UNSET
|
@@ -12,73 +12,84 @@ from typing import Any, Dict, List
|
|
12
12
|
from typing_extensions import NotRequired, TypedDict
|
13
13
|
|
14
14
|
|
15
|
-
class StageDefinitionDefaultParametersTypedDict(TypedDict):
|
16
|
-
pass
|
17
|
-
|
18
|
-
|
19
|
-
class StageDefinitionDefaultParameters(BaseModel):
|
20
|
-
pass
|
21
|
-
|
22
|
-
|
23
15
|
class StageDefinitionTypedDict(TypedDict):
|
24
16
|
r"""Model for retriever stage definition that describes how to process and search documents."""
|
25
17
|
|
26
18
|
stage_name: str
|
27
|
-
r"""
|
19
|
+
r"""Unique name identifying the stage type (e.g., 'knn_search', 'face_search')"""
|
28
20
|
description: str
|
21
|
+
r"""Human-readable explanation of what the stage does"""
|
29
22
|
version: str
|
30
|
-
|
23
|
+
r"""Version string for the stage definition (e.g., '1.0.0')"""
|
31
24
|
input_schema: Dict[str, BucketSchemaFieldOutputTypedDict]
|
25
|
+
r"""Defines the data structure required from the retriever's overall input query"""
|
32
26
|
output_schema: Dict[str, BucketSchemaFieldOutputTypedDict]
|
27
|
+
r"""Defines the data structure produced by this stage"""
|
33
28
|
parameter_schema: Dict[str, BucketSchemaFieldOutputTypedDict]
|
29
|
+
r"""Defines the configurable parameters accepted by this stage instance (e.g., thresholds, limits)"""
|
34
30
|
supported_input_types: List[str]
|
31
|
+
r"""List of general data types the stage can process (e.g., ['text', 'vector'])"""
|
35
32
|
max_inputs: Dict[str, int]
|
36
|
-
|
33
|
+
r"""Specifies the maximum number of inputs allowed per type (e.g., {'text': 1})"""
|
34
|
+
max_total_inputs: NotRequired[Nullable[int]]
|
35
|
+
r"""Specifies the maximum total number of inputs allowed across all types defined in input_schema (e.g., 1 means only one input field can be provided)"""
|
37
36
|
required_vector_indexes: NotRequired[Nullable[List[VectorIndexDefinitionTypedDict]]]
|
37
|
+
r"""List of vector index configurations that must exist in the target collections for this stage to function"""
|
38
38
|
required_payload_indexes: NotRequired[Nullable[List[Any]]]
|
39
|
+
r"""List of payload index configurations (e.g., for specific field filtering) required in the target collections"""
|
39
40
|
supported_filters: NotRequired[Nullable[List[str]]]
|
40
|
-
r"""List of filter operations supported by this stage"""
|
41
|
+
r"""List of filter operations supported by this stage (e.g., ['=', '>', '<'])"""
|
41
42
|
|
42
43
|
|
43
44
|
class StageDefinition(BaseModel):
|
44
45
|
r"""Model for retriever stage definition that describes how to process and search documents."""
|
45
46
|
|
46
47
|
stage_name: str
|
47
|
-
r"""
|
48
|
+
r"""Unique name identifying the stage type (e.g., 'knn_search', 'face_search')"""
|
48
49
|
|
49
50
|
description: str
|
51
|
+
r"""Human-readable explanation of what the stage does"""
|
50
52
|
|
51
53
|
version: str
|
52
|
-
|
53
|
-
module_path: str
|
54
|
+
r"""Version string for the stage definition (e.g., '1.0.0')"""
|
54
55
|
|
55
56
|
input_schema: Dict[str, BucketSchemaFieldOutput]
|
57
|
+
r"""Defines the data structure required from the retriever's overall input query"""
|
56
58
|
|
57
59
|
output_schema: Dict[str, BucketSchemaFieldOutput]
|
60
|
+
r"""Defines the data structure produced by this stage"""
|
58
61
|
|
59
62
|
parameter_schema: Dict[str, BucketSchemaFieldOutput]
|
63
|
+
r"""Defines the configurable parameters accepted by this stage instance (e.g., thresholds, limits)"""
|
60
64
|
|
61
65
|
supported_input_types: List[str]
|
66
|
+
r"""List of general data types the stage can process (e.g., ['text', 'vector'])"""
|
62
67
|
|
63
68
|
max_inputs: Dict[str, int]
|
69
|
+
r"""Specifies the maximum number of inputs allowed per type (e.g., {'text': 1})"""
|
64
70
|
|
65
|
-
|
71
|
+
max_total_inputs: OptionalNullable[int] = UNSET
|
72
|
+
r"""Specifies the maximum total number of inputs allowed across all types defined in input_schema (e.g., 1 means only one input field can be provided)"""
|
66
73
|
|
67
74
|
required_vector_indexes: OptionalNullable[List[VectorIndexDefinition]] = UNSET
|
75
|
+
r"""List of vector index configurations that must exist in the target collections for this stage to function"""
|
68
76
|
|
69
77
|
required_payload_indexes: OptionalNullable[List[Any]] = UNSET
|
78
|
+
r"""List of payload index configurations (e.g., for specific field filtering) required in the target collections"""
|
70
79
|
|
71
80
|
supported_filters: OptionalNullable[List[str]] = UNSET
|
72
|
-
r"""List of filter operations supported by this stage"""
|
81
|
+
r"""List of filter operations supported by this stage (e.g., ['=', '>', '<'])"""
|
73
82
|
|
74
83
|
@model_serializer(mode="wrap")
|
75
84
|
def serialize_model(self, handler):
|
76
85
|
optional_fields = [
|
86
|
+
"max_total_inputs",
|
77
87
|
"required_vector_indexes",
|
78
88
|
"required_payload_indexes",
|
79
89
|
"supported_filters",
|
80
90
|
]
|
81
91
|
nullable_fields = [
|
92
|
+
"max_total_inputs",
|
82
93
|
"required_vector_indexes",
|
83
94
|
"required_payload_indexes",
|
84
95
|
"supported_filters",
|
mixpeek/models/stageresponse.py
CHANGED
@@ -3,22 +3,14 @@
|
|
3
3
|
from __future__ import annotations
|
4
4
|
from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
5
5
|
from pydantic import model_serializer
|
6
|
-
from typing import List
|
6
|
+
from typing import Any, Dict, List
|
7
7
|
from typing_extensions import NotRequired, TypedDict
|
8
8
|
|
9
9
|
|
10
|
-
class ResultsTypedDict(TypedDict):
|
11
|
-
pass
|
12
|
-
|
13
|
-
|
14
|
-
class Results(BaseModel):
|
15
|
-
pass
|
16
|
-
|
17
|
-
|
18
10
|
class StageResponseTypedDict(TypedDict):
|
19
11
|
r"""Output from a retriever stage"""
|
20
12
|
|
21
|
-
results: List[
|
13
|
+
results: List[Dict[str, Any]]
|
22
14
|
execution_time: float
|
23
15
|
total_results: NotRequired[Nullable[int]]
|
24
16
|
r"""Total number of results not filtered by pagination"""
|
@@ -27,7 +19,7 @@ class StageResponseTypedDict(TypedDict):
|
|
27
19
|
class StageResponse(BaseModel):
|
28
20
|
r"""Output from a retriever stage"""
|
29
21
|
|
30
|
-
results: List[
|
22
|
+
results: List[Dict[str, Any]]
|
31
23
|
|
32
24
|
execution_time: float
|
33
25
|
|
@@ -4,18 +4,10 @@ from __future__ import annotations
|
|
4
4
|
from .createblobrequest import CreateBlobRequest, CreateBlobRequestTypedDict
|
5
5
|
from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
6
6
|
from pydantic import model_serializer
|
7
|
-
from typing import List
|
7
|
+
from typing import Any, Dict, List
|
8
8
|
from typing_extensions import NotRequired, TypedDict
|
9
9
|
|
10
10
|
|
11
|
-
class UpdateObjectRequestMetadataTypedDict(TypedDict):
|
12
|
-
pass
|
13
|
-
|
14
|
-
|
15
|
-
class UpdateObjectRequestMetadata(BaseModel):
|
16
|
-
pass
|
17
|
-
|
18
|
-
|
19
11
|
class UpdateObjectRequestTypedDict(TypedDict):
|
20
12
|
r"""Request model for updating an existing bucket object"""
|
21
13
|
|
@@ -23,7 +15,7 @@ class UpdateObjectRequestTypedDict(TypedDict):
|
|
23
15
|
r"""Updated storage key/path prefix of the object, this will be used to retrieve the object from the storage. It's at the root of the object."""
|
24
16
|
blobs: NotRequired[Nullable[List[CreateBlobRequestTypedDict]]]
|
25
17
|
r"""List of new or updated blobs for this object"""
|
26
|
-
metadata: NotRequired[Nullable[
|
18
|
+
metadata: NotRequired[Nullable[Dict[str, Any]]]
|
27
19
|
r"""Updated metadata for the object, this will be merged with existing metadata."""
|
28
20
|
skip_duplicates: NotRequired[Nullable[bool]]
|
29
21
|
r"""Skip duplicate blobs, if a blob with the same hash already exists, it will be skipped."""
|
@@ -38,7 +30,7 @@ class UpdateObjectRequest(BaseModel):
|
|
38
30
|
blobs: OptionalNullable[List[CreateBlobRequest]] = UNSET
|
39
31
|
r"""List of new or updated blobs for this object"""
|
40
32
|
|
41
|
-
metadata: OptionalNullable[
|
33
|
+
metadata: OptionalNullable[Dict[str, Any]] = UNSET
|
42
34
|
r"""Updated metadata for the object, this will be merged with existing metadata."""
|
43
35
|
|
44
36
|
skip_duplicates: OptionalNullable[bool] = UNSET
|
@@ -4,24 +4,16 @@ from __future__ import annotations
|
|
4
4
|
from .apikey import APIKey, APIKeyTypedDict
|
5
5
|
from datetime import datetime
|
6
6
|
from mixpeek.types import BaseModel
|
7
|
-
from typing import List, Optional
|
7
|
+
from typing import Any, Dict, List, Optional
|
8
8
|
from typing_extensions import NotRequired, TypedDict
|
9
9
|
|
10
10
|
|
11
|
-
class UserModelInputMetadataTypedDict(TypedDict):
|
12
|
-
pass
|
13
|
-
|
14
|
-
|
15
|
-
class UserModelInputMetadata(BaseModel):
|
16
|
-
pass
|
17
|
-
|
18
|
-
|
19
11
|
class UserModelInputTypedDict(TypedDict):
|
20
12
|
email: str
|
21
13
|
user_id: NotRequired[str]
|
22
14
|
user_name: NotRequired[str]
|
23
15
|
api_keys: NotRequired[List[APIKeyTypedDict]]
|
24
|
-
metadata: NotRequired[
|
16
|
+
metadata: NotRequired[Dict[str, Any]]
|
25
17
|
created_at: NotRequired[datetime]
|
26
18
|
|
27
19
|
|
@@ -34,6 +26,6 @@ class UserModelInput(BaseModel):
|
|
34
26
|
|
35
27
|
api_keys: Optional[List[APIKey]] = None
|
36
28
|
|
37
|
-
metadata: Optional[
|
29
|
+
metadata: Optional[Dict[str, Any]] = None
|
38
30
|
|
39
31
|
created_at: Optional[datetime] = None
|
@@ -4,24 +4,16 @@ from __future__ import annotations
|
|
4
4
|
from .apikey import APIKey, APIKeyTypedDict
|
5
5
|
from datetime import datetime
|
6
6
|
from mixpeek.types import BaseModel
|
7
|
-
from typing import List, Optional
|
7
|
+
from typing import Any, Dict, List, Optional
|
8
8
|
from typing_extensions import NotRequired, TypedDict
|
9
9
|
|
10
10
|
|
11
|
-
class UserModelOutputMetadataTypedDict(TypedDict):
|
12
|
-
pass
|
13
|
-
|
14
|
-
|
15
|
-
class UserModelOutputMetadata(BaseModel):
|
16
|
-
pass
|
17
|
-
|
18
|
-
|
19
11
|
class UserModelOutputTypedDict(TypedDict):
|
20
12
|
email: str
|
21
13
|
user_id: NotRequired[str]
|
22
14
|
user_name: NotRequired[str]
|
23
15
|
api_keys: NotRequired[List[APIKeyTypedDict]]
|
24
|
-
metadata: NotRequired[
|
16
|
+
metadata: NotRequired[Dict[str, Any]]
|
25
17
|
created_at: NotRequired[datetime]
|
26
18
|
|
27
19
|
|
@@ -34,6 +26,6 @@ class UserModelOutput(BaseModel):
|
|
34
26
|
|
35
27
|
api_keys: Optional[List[APIKey]] = None
|
36
28
|
|
37
|
-
metadata: Optional[
|
29
|
+
metadata: Optional[Dict[str, Any]] = None
|
38
30
|
|
39
31
|
created_at: Optional[datetime] = None
|
mixpeek/namespaces.py
CHANGED
@@ -13,13 +13,11 @@ class Namespaces(BaseSDK):
|
|
13
13
|
self,
|
14
14
|
*,
|
15
15
|
namespace_name: str,
|
16
|
+
feature_extractors: Union[
|
17
|
+
List[models.BasicFeatureExtractor],
|
18
|
+
List[models.BasicFeatureExtractorTypedDict],
|
19
|
+
],
|
16
20
|
description: OptionalNullable[str] = UNSET,
|
17
|
-
feature_extractors: Optional[
|
18
|
-
Union[
|
19
|
-
List[models.BasicFeatureExtractor],
|
20
|
-
List[models.BasicFeatureExtractorTypedDict],
|
21
|
-
]
|
22
|
-
] = None,
|
23
21
|
payload_indexes: OptionalNullable[
|
24
22
|
Union[
|
25
23
|
List[models.PayloadIndexConfig],
|
@@ -33,12 +31,12 @@ class Namespaces(BaseSDK):
|
|
33
31
|
) -> models.NamespaceResponse:
|
34
32
|
r"""Create Namespace
|
35
33
|
|
36
|
-
Creates a new namespace with
|
34
|
+
Creates a new namespace with specified feature extractors and payload indexes.
|
37
35
|
|
38
36
|
:param namespace_name: Name of the namespace to create
|
37
|
+
:param feature_extractors: List of feature extractors to use. At least one feature extractor must be provided.
|
39
38
|
:param description: Description of the namespace
|
40
|
-
:param
|
41
|
-
:param payload_indexes: List of payload index configurations
|
39
|
+
:param payload_indexes: Optional list of custom payload index configurations. Indexes required by selected feature extractors will be added automatically.
|
42
40
|
:param retries: Override the default retry configuration for this method
|
43
41
|
:param server_url: Override the default server URL for this method
|
44
42
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
@@ -58,7 +56,7 @@ class Namespaces(BaseSDK):
|
|
58
56
|
namespace_name=namespace_name,
|
59
57
|
description=description,
|
60
58
|
feature_extractors=utils.get_pydantic_model(
|
61
|
-
feature_extractors,
|
59
|
+
feature_extractors, List[models.BasicFeatureExtractor]
|
62
60
|
),
|
63
61
|
payload_indexes=utils.get_pydantic_model(
|
64
62
|
payload_indexes, OptionalNullable[List[models.PayloadIndexConfig]]
|
@@ -94,6 +92,7 @@ class Namespaces(BaseSDK):
|
|
94
92
|
|
95
93
|
http_res = self.do_request(
|
96
94
|
hook_ctx=HookContext(
|
95
|
+
config=self.sdk_configuration,
|
97
96
|
base_url=base_url or "",
|
98
97
|
operation_id="create_namespace_v1_namespaces_post",
|
99
98
|
oauth2_scopes=[],
|
@@ -107,7 +106,7 @@ class Namespaces(BaseSDK):
|
|
107
106
|
)
|
108
107
|
|
109
108
|
response_data: Any = None
|
110
|
-
if utils.match_response(http_res, "
|
109
|
+
if utils.match_response(http_res, "201", "application/json"):
|
111
110
|
return utils.unmarshal_json(http_res.text, models.NamespaceResponse)
|
112
111
|
if utils.match_response(
|
113
112
|
http_res, ["400", "401", "403", "404"], "application/json"
|
@@ -150,13 +149,11 @@ class Namespaces(BaseSDK):
|
|
150
149
|
self,
|
151
150
|
*,
|
152
151
|
namespace_name: str,
|
152
|
+
feature_extractors: Union[
|
153
|
+
List[models.BasicFeatureExtractor],
|
154
|
+
List[models.BasicFeatureExtractorTypedDict],
|
155
|
+
],
|
153
156
|
description: OptionalNullable[str] = UNSET,
|
154
|
-
feature_extractors: Optional[
|
155
|
-
Union[
|
156
|
-
List[models.BasicFeatureExtractor],
|
157
|
-
List[models.BasicFeatureExtractorTypedDict],
|
158
|
-
]
|
159
|
-
] = None,
|
160
157
|
payload_indexes: OptionalNullable[
|
161
158
|
Union[
|
162
159
|
List[models.PayloadIndexConfig],
|
@@ -170,12 +167,12 @@ class Namespaces(BaseSDK):
|
|
170
167
|
) -> models.NamespaceResponse:
|
171
168
|
r"""Create Namespace
|
172
169
|
|
173
|
-
Creates a new namespace with
|
170
|
+
Creates a new namespace with specified feature extractors and payload indexes.
|
174
171
|
|
175
172
|
:param namespace_name: Name of the namespace to create
|
173
|
+
:param feature_extractors: List of feature extractors to use. At least one feature extractor must be provided.
|
176
174
|
:param description: Description of the namespace
|
177
|
-
:param
|
178
|
-
:param payload_indexes: List of payload index configurations
|
175
|
+
:param payload_indexes: Optional list of custom payload index configurations. Indexes required by selected feature extractors will be added automatically.
|
179
176
|
:param retries: Override the default retry configuration for this method
|
180
177
|
:param server_url: Override the default server URL for this method
|
181
178
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
@@ -195,7 +192,7 @@ class Namespaces(BaseSDK):
|
|
195
192
|
namespace_name=namespace_name,
|
196
193
|
description=description,
|
197
194
|
feature_extractors=utils.get_pydantic_model(
|
198
|
-
feature_extractors,
|
195
|
+
feature_extractors, List[models.BasicFeatureExtractor]
|
199
196
|
),
|
200
197
|
payload_indexes=utils.get_pydantic_model(
|
201
198
|
payload_indexes, OptionalNullable[List[models.PayloadIndexConfig]]
|
@@ -231,6 +228,7 @@ class Namespaces(BaseSDK):
|
|
231
228
|
|
232
229
|
http_res = await self.do_request_async(
|
233
230
|
hook_ctx=HookContext(
|
231
|
+
config=self.sdk_configuration,
|
234
232
|
base_url=base_url or "",
|
235
233
|
operation_id="create_namespace_v1_namespaces_post",
|
236
234
|
oauth2_scopes=[],
|
@@ -244,7 +242,7 @@ class Namespaces(BaseSDK):
|
|
244
242
|
)
|
245
243
|
|
246
244
|
response_data: Any = None
|
247
|
-
if utils.match_response(http_res, "
|
245
|
+
if utils.match_response(http_res, "201", "application/json"):
|
248
246
|
return utils.unmarshal_json(http_res.text, models.NamespaceResponse)
|
249
247
|
if utils.match_response(
|
250
248
|
http_res, ["400", "401", "403", "404"], "application/json"
|
@@ -335,6 +333,7 @@ class Namespaces(BaseSDK):
|
|
335
333
|
|
336
334
|
http_res = self.do_request(
|
337
335
|
hook_ctx=HookContext(
|
336
|
+
config=self.sdk_configuration,
|
338
337
|
base_url=base_url or "",
|
339
338
|
operation_id="list_namespaces_v1_namespaces_get",
|
340
339
|
oauth2_scopes=[],
|
@@ -439,6 +438,7 @@ class Namespaces(BaseSDK):
|
|
439
438
|
|
440
439
|
http_res = await self.do_request_async(
|
441
440
|
hook_ctx=HookContext(
|
441
|
+
config=self.sdk_configuration,
|
442
442
|
base_url=base_url or "",
|
443
443
|
operation_id="list_namespaces_v1_namespaces_get",
|
444
444
|
oauth2_scopes=[],
|
@@ -550,6 +550,7 @@ class Namespaces(BaseSDK):
|
|
550
550
|
|
551
551
|
http_res = self.do_request(
|
552
552
|
hook_ctx=HookContext(
|
553
|
+
config=self.sdk_configuration,
|
553
554
|
base_url=base_url or "",
|
554
555
|
operation_id="delete_namespace_v1_namespaces__namespace__delete",
|
555
556
|
oauth2_scopes=[],
|
@@ -661,6 +662,7 @@ class Namespaces(BaseSDK):
|
|
661
662
|
|
662
663
|
http_res = await self.do_request_async(
|
663
664
|
hook_ctx=HookContext(
|
665
|
+
config=self.sdk_configuration,
|
664
666
|
base_url=base_url or "",
|
665
667
|
operation_id="delete_namespace_v1_namespaces__namespace__delete",
|
666
668
|
oauth2_scopes=[],
|
@@ -794,6 +796,7 @@ class Namespaces(BaseSDK):
|
|
794
796
|
|
795
797
|
http_res = self.do_request(
|
796
798
|
hook_ctx=HookContext(
|
799
|
+
config=self.sdk_configuration,
|
797
800
|
base_url=base_url or "",
|
798
801
|
operation_id="update_namespace_v1_namespaces__namespace__put",
|
799
802
|
oauth2_scopes=[],
|
@@ -927,6 +930,7 @@ class Namespaces(BaseSDK):
|
|
927
930
|
|
928
931
|
http_res = await self.do_request_async(
|
929
932
|
hook_ctx=HookContext(
|
933
|
+
config=self.sdk_configuration,
|
930
934
|
base_url=base_url or "",
|
931
935
|
operation_id="update_namespace_v1_namespaces__namespace__put",
|
932
936
|
oauth2_scopes=[],
|
@@ -1038,6 +1042,7 @@ class Namespaces(BaseSDK):
|
|
1038
1042
|
|
1039
1043
|
http_res = self.do_request(
|
1040
1044
|
hook_ctx=HookContext(
|
1045
|
+
config=self.sdk_configuration,
|
1041
1046
|
base_url=base_url or "",
|
1042
1047
|
operation_id="get_namespace_v1_namespaces__namespace__get",
|
1043
1048
|
oauth2_scopes=[],
|
@@ -1149,6 +1154,7 @@ class Namespaces(BaseSDK):
|
|
1149
1154
|
|
1150
1155
|
http_res = await self.do_request_async(
|
1151
1156
|
hook_ctx=HookContext(
|
1157
|
+
config=self.sdk_configuration,
|
1152
1158
|
base_url=base_url or "",
|
1153
1159
|
operation_id="get_namespace_v1_namespaces__namespace__get",
|
1154
1160
|
oauth2_scopes=[],
|
@@ -59,6 +59,7 @@ class OrganizationNotifications(BaseSDK):
|
|
59
59
|
|
60
60
|
http_res = self.do_request(
|
61
61
|
hook_ctx=HookContext(
|
62
|
+
config=self.sdk_configuration,
|
62
63
|
base_url=base_url or "",
|
63
64
|
operation_id="send_notification_v1_organizations_notifications_send_post",
|
64
65
|
oauth2_scopes=[],
|
@@ -161,6 +162,7 @@ class OrganizationNotifications(BaseSDK):
|
|
161
162
|
|
162
163
|
http_res = await self.do_request_async(
|
163
164
|
hook_ctx=HookContext(
|
165
|
+
config=self.sdk_configuration,
|
164
166
|
base_url=base_url or "",
|
165
167
|
operation_id="send_notification_v1_organizations_notifications_send_post",
|
166
168
|
oauth2_scopes=[],
|
mixpeek/organizations.py
CHANGED
@@ -6,7 +6,7 @@ from mixpeek import models, utils
|
|
6
6
|
from mixpeek._hooks import HookContext
|
7
7
|
from mixpeek.types import OptionalNullable, UNSET
|
8
8
|
from mixpeek.utils import get_security_from_env
|
9
|
-
from typing import Any, List, Mapping, Optional, Union
|
9
|
+
from typing import Any, Dict, List, Mapping, Optional, Union
|
10
10
|
|
11
11
|
|
12
12
|
class Organizations(BaseSDK):
|
@@ -63,6 +63,7 @@ class Organizations(BaseSDK):
|
|
63
63
|
|
64
64
|
http_res = self.do_request(
|
65
65
|
hook_ctx=HookContext(
|
66
|
+
config=self.sdk_configuration,
|
66
67
|
base_url=base_url or "",
|
67
68
|
operation_id="get_organization_v1_organizations_get",
|
68
69
|
oauth2_scopes=[],
|
@@ -168,6 +169,7 @@ class Organizations(BaseSDK):
|
|
168
169
|
|
169
170
|
http_res = await self.do_request_async(
|
170
171
|
hook_ctx=HookContext(
|
172
|
+
config=self.sdk_configuration,
|
171
173
|
base_url=base_url or "",
|
172
174
|
operation_id="get_organization_v1_organizations_get",
|
173
175
|
oauth2_scopes=[],
|
@@ -229,9 +231,7 @@ class Organizations(BaseSDK):
|
|
229
231
|
api_keys: Optional[
|
230
232
|
Union[List[models.APIKey], List[models.APIKeyTypedDict]]
|
231
233
|
] = None,
|
232
|
-
metadata: Optional[
|
233
|
-
Union[models.UserModelInputMetadata, models.UserModelInputMetadataTypedDict]
|
234
|
-
] = None,
|
234
|
+
metadata: Optional[Dict[str, Any]] = None,
|
235
235
|
created_at: Optional[datetime] = None,
|
236
236
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
237
237
|
server_url: Optional[str] = None,
|
@@ -269,9 +269,7 @@ class Organizations(BaseSDK):
|
|
269
269
|
user_name=user_name,
|
270
270
|
email=email,
|
271
271
|
api_keys=utils.get_pydantic_model(api_keys, Optional[List[models.APIKey]]),
|
272
|
-
metadata=
|
273
|
-
metadata, Optional[models.UserModelInputMetadata]
|
274
|
-
),
|
272
|
+
metadata=metadata,
|
275
273
|
created_at=created_at,
|
276
274
|
)
|
277
275
|
|
@@ -304,6 +302,7 @@ class Organizations(BaseSDK):
|
|
304
302
|
|
305
303
|
http_res = self.do_request(
|
306
304
|
hook_ctx=HookContext(
|
305
|
+
config=self.sdk_configuration,
|
307
306
|
base_url=base_url or "",
|
308
307
|
operation_id="add_user_v1_organizations_users_post",
|
309
308
|
oauth2_scopes=[],
|
@@ -365,9 +364,7 @@ class Organizations(BaseSDK):
|
|
365
364
|
api_keys: Optional[
|
366
365
|
Union[List[models.APIKey], List[models.APIKeyTypedDict]]
|
367
366
|
] = None,
|
368
|
-
metadata: Optional[
|
369
|
-
Union[models.UserModelInputMetadata, models.UserModelInputMetadataTypedDict]
|
370
|
-
] = None,
|
367
|
+
metadata: Optional[Dict[str, Any]] = None,
|
371
368
|
created_at: Optional[datetime] = None,
|
372
369
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
373
370
|
server_url: Optional[str] = None,
|
@@ -405,9 +402,7 @@ class Organizations(BaseSDK):
|
|
405
402
|
user_name=user_name,
|
406
403
|
email=email,
|
407
404
|
api_keys=utils.get_pydantic_model(api_keys, Optional[List[models.APIKey]]),
|
408
|
-
metadata=
|
409
|
-
metadata, Optional[models.UserModelInputMetadata]
|
410
|
-
),
|
405
|
+
metadata=metadata,
|
411
406
|
created_at=created_at,
|
412
407
|
)
|
413
408
|
|
@@ -440,6 +435,7 @@ class Organizations(BaseSDK):
|
|
440
435
|
|
441
436
|
http_res = await self.do_request_async(
|
442
437
|
hook_ctx=HookContext(
|
438
|
+
config=self.sdk_configuration,
|
443
439
|
base_url=base_url or "",
|
444
440
|
operation_id="add_user_v1_organizations_users_post",
|
445
441
|
oauth2_scopes=[],
|
@@ -556,6 +552,7 @@ class Organizations(BaseSDK):
|
|
556
552
|
|
557
553
|
http_res = self.do_request(
|
558
554
|
hook_ctx=HookContext(
|
555
|
+
config=self.sdk_configuration,
|
559
556
|
base_url=base_url or "",
|
560
557
|
operation_id="delete_api_key_v1_organizations_users__user_email__api_keys__key_name__delete",
|
561
558
|
oauth2_scopes=[],
|
@@ -672,6 +669,7 @@ class Organizations(BaseSDK):
|
|
672
669
|
|
673
670
|
http_res = await self.do_request_async(
|
674
671
|
hook_ctx=HookContext(
|
672
|
+
config=self.sdk_configuration,
|
675
673
|
base_url=base_url or "",
|
676
674
|
operation_id="delete_api_key_v1_organizations_users__user_email__api_keys__key_name__delete",
|
677
675
|
oauth2_scopes=[],
|
@@ -799,6 +797,7 @@ class Organizations(BaseSDK):
|
|
799
797
|
|
800
798
|
http_res = self.do_request(
|
801
799
|
hook_ctx=HookContext(
|
800
|
+
config=self.sdk_configuration,
|
802
801
|
base_url=base_url or "",
|
803
802
|
operation_id="update_api_key_v1_organizations_users__user_email__api_keys__key_name__patch",
|
804
803
|
oauth2_scopes=[],
|
@@ -926,6 +925,7 @@ class Organizations(BaseSDK):
|
|
926
925
|
|
927
926
|
http_res = await self.do_request_async(
|
928
927
|
hook_ctx=HookContext(
|
928
|
+
config=self.sdk_configuration,
|
929
929
|
base_url=base_url or "",
|
930
930
|
operation_id="update_api_key_v1_organizations_users__user_email__api_keys__key_name__patch",
|
931
931
|
oauth2_scopes=[],
|
mixpeek/organizationsusage.py
CHANGED
@@ -71,6 +71,7 @@ class OrganizationsUsage(BaseSDK):
|
|
71
71
|
|
72
72
|
http_res = self.do_request(
|
73
73
|
hook_ctx=HookContext(
|
74
|
+
config=self.sdk_configuration,
|
74
75
|
base_url=base_url or "",
|
75
76
|
operation_id="get_usage_v1_organizations_usage_post",
|
76
77
|
oauth2_scopes=[],
|
@@ -185,6 +186,7 @@ class OrganizationsUsage(BaseSDK):
|
|
185
186
|
|
186
187
|
http_res = await self.do_request_async(
|
187
188
|
hook_ctx=HookContext(
|
189
|
+
config=self.sdk_configuration,
|
188
190
|
base_url=base_url or "",
|
189
191
|
operation_id="get_usage_v1_organizations_usage_post",
|
190
192
|
oauth2_scopes=[],
|
mixpeek/research.py
CHANGED
@@ -66,6 +66,7 @@ class Research(BaseSDK):
|
|
66
66
|
|
67
67
|
http_res = self.do_request(
|
68
68
|
hook_ctx=HookContext(
|
69
|
+
config=self.sdk_configuration,
|
69
70
|
base_url=base_url or "",
|
70
71
|
operation_id="get_research_v1_research_get",
|
71
72
|
oauth2_scopes=[],
|
@@ -175,6 +176,7 @@ class Research(BaseSDK):
|
|
175
176
|
|
176
177
|
http_res = await self.do_request_async(
|
177
178
|
hook_ctx=HookContext(
|
179
|
+
config=self.sdk_configuration,
|
178
180
|
base_url=base_url or "",
|
179
181
|
operation_id="get_research_v1_research_get",
|
180
182
|
oauth2_scopes=[],
|