mixpeek 0.21.8__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 +744 -596
- 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 +3 -11
- 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 +3 -11
- mixpeek/models/retrieverqueryrequest.py +3 -11
- mixpeek/models/retrieverschemafield_input.py +6 -26
- mixpeek/models/retrieverschemafield_output.py +6 -26
- 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 +15 -33
- 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.8.dist-info → mixpeek-0.22.0.dist-info}/METADATA +3 -15
- {mixpeek-0.21.8.dist-info → mixpeek-0.22.0.dist-info}/RECORD +71 -77
- {mixpeek-0.21.8.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
mixpeek/models/objectresponse.py
CHANGED
@@ -6,18 +6,10 @@ from .taskstatus import TaskStatus
|
|
6
6
|
from datetime import datetime
|
7
7
|
from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
8
8
|
from pydantic import model_serializer
|
9
|
-
from typing import List
|
9
|
+
from typing import Any, Dict, List
|
10
10
|
from typing_extensions import NotRequired, TypedDict
|
11
11
|
|
12
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
13
|
class ObjectResponseTypedDict(TypedDict):
|
22
14
|
r"""Response model for bucket objects"""
|
23
15
|
|
@@ -28,7 +20,7 @@ class ObjectResponseTypedDict(TypedDict):
|
|
28
20
|
blobs: List[BlobModelTypedDict]
|
29
21
|
r"""List of blobs contained in this object"""
|
30
22
|
status: TaskStatus
|
31
|
-
metadata:
|
23
|
+
metadata: Dict[str, Any]
|
32
24
|
r"""Additional metadata for the object, appended to downstream documents of connected collections"""
|
33
25
|
task_id: NotRequired[Nullable[str]]
|
34
26
|
r"""ID of the task that created this object, used to track the object creation progress and status"""
|
@@ -58,7 +50,7 @@ class ObjectResponse(BaseModel):
|
|
58
50
|
|
59
51
|
status: TaskStatus
|
60
52
|
|
61
|
-
metadata:
|
53
|
+
metadata: Dict[str, Any]
|
62
54
|
r"""Additional metadata for the object, appended to downstream documents of connected collections"""
|
63
55
|
|
64
56
|
task_id: OptionalNullable[str] = UNSET
|
@@ -4,18 +4,10 @@ from __future__ import annotations
|
|
4
4
|
from .usermodel_output import UserModelOutput, UserModelOutputTypedDict
|
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 OrganizationModelMetadataTypedDict(TypedDict):
|
12
|
-
pass
|
13
|
-
|
14
|
-
|
15
|
-
class OrganizationModelMetadata(BaseModel):
|
16
|
-
pass
|
17
|
-
|
18
|
-
|
19
11
|
class OrganizationModelTypedDict(TypedDict):
|
20
12
|
organization_name: str
|
21
13
|
organization_id: NotRequired[str]
|
@@ -23,7 +15,7 @@ class OrganizationModelTypedDict(TypedDict):
|
|
23
15
|
created_at: NotRequired[datetime]
|
24
16
|
account_type: NotRequired[str]
|
25
17
|
credit_count: NotRequired[int]
|
26
|
-
metadata: NotRequired[
|
18
|
+
metadata: NotRequired[Dict[str, Any]]
|
27
19
|
users: NotRequired[List[UserModelOutputTypedDict]]
|
28
20
|
|
29
21
|
|
@@ -40,6 +32,6 @@ class OrganizationModel(BaseModel):
|
|
40
32
|
|
41
33
|
credit_count: Optional[int] = 1000
|
42
34
|
|
43
|
-
metadata: Optional[
|
35
|
+
metadata: Optional[Dict[str, Any]] = None
|
44
36
|
|
45
37
|
users: Optional[List[UserModelOutput]] = None
|
@@ -3,23 +3,16 @@
|
|
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 Any, Dict
|
6
7
|
from typing_extensions import NotRequired, TypedDict
|
7
8
|
|
8
9
|
|
9
|
-
class InputsTypedDict(TypedDict):
|
10
|
-
pass
|
11
|
-
|
12
|
-
|
13
|
-
class Inputs(BaseModel):
|
14
|
-
pass
|
15
|
-
|
16
|
-
|
17
10
|
class RetrieverBindingTypedDict(TypedDict):
|
18
11
|
r"""How a retriever should be used in a taxonomy"""
|
19
12
|
|
20
13
|
retriever_id: str
|
21
14
|
r"""ID of the retriever to use"""
|
22
|
-
inputs: NotRequired[Nullable[
|
15
|
+
inputs: NotRequired[Nullable[Dict[str, Any]]]
|
23
16
|
r"""Optional inputs to the retriever. If not provided, will use source collection schema"""
|
24
17
|
|
25
18
|
|
@@ -29,7 +22,7 @@ class RetrieverBinding(BaseModel):
|
|
29
22
|
retriever_id: str
|
30
23
|
r"""ID of the retriever to use"""
|
31
24
|
|
32
|
-
inputs: OptionalNullable[
|
25
|
+
inputs: OptionalNullable[Dict[str, Any]] = UNSET
|
33
26
|
r"""Optional inputs to the retriever. If not provided, will use source collection schema"""
|
34
27
|
|
35
28
|
@model_serializer(mode="wrap")
|
mixpeek/models/retrievermodel.py
CHANGED
@@ -9,18 +9,10 @@ from .retrieverschema_output import (
|
|
9
9
|
from .stageconfig_output import StageConfigOutput, StageConfigOutputTypedDict
|
10
10
|
from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
11
11
|
from pydantic import model_serializer
|
12
|
-
from typing import List, Optional
|
12
|
+
from typing import Any, Dict, List, Optional
|
13
13
|
from typing_extensions import NotRequired, TypedDict
|
14
14
|
|
15
15
|
|
16
|
-
class RetrieverModelMetadataTypedDict(TypedDict):
|
17
|
-
pass
|
18
|
-
|
19
|
-
|
20
|
-
class RetrieverModelMetadata(BaseModel):
|
21
|
-
pass
|
22
|
-
|
23
|
-
|
24
16
|
class RetrieverModelTypedDict(TypedDict):
|
25
17
|
r"""Definition of a retriever"""
|
26
18
|
|
@@ -36,7 +28,7 @@ class RetrieverModelTypedDict(TypedDict):
|
|
36
28
|
r"""Unique identifier for the retriever"""
|
37
29
|
description: NotRequired[Nullable[str]]
|
38
30
|
r"""Description of the retriever"""
|
39
|
-
metadata: NotRequired[
|
31
|
+
metadata: NotRequired[Dict[str, Any]]
|
40
32
|
cache_config: NotRequired[Nullable[RetrieverCacheConfigTypedDict]]
|
41
33
|
r"""Configuration for retriever-level caching"""
|
42
34
|
|
@@ -62,7 +54,7 @@ class RetrieverModel(BaseModel):
|
|
62
54
|
description: OptionalNullable[str] = UNSET
|
63
55
|
r"""Description of the retriever"""
|
64
56
|
|
65
|
-
metadata: Optional[
|
57
|
+
metadata: Optional[Dict[str, Any]] = None
|
66
58
|
|
67
59
|
cache_config: OptionalNullable[RetrieverCacheConfig] = UNSET
|
68
60
|
r"""Configuration for retriever-level caching"""
|
@@ -5,18 +5,10 @@ from .logicaloperator_input import LogicalOperatorInput, LogicalOperatorInputTyp
|
|
5
5
|
from .sortoption import SortOption, SortOptionTypedDict
|
6
6
|
from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
7
7
|
from pydantic import model_serializer
|
8
|
-
from typing import List, Optional
|
8
|
+
from typing import Any, Dict, List, Optional
|
9
9
|
from typing_extensions import NotRequired, TypedDict
|
10
10
|
|
11
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
12
|
class RetrieverQueryRequestTypedDict(TypedDict):
|
21
13
|
r"""Query parameters for executing a retriever pipeline.
|
22
14
|
|
@@ -25,7 +17,7 @@ class RetrieverQueryRequestTypedDict(TypedDict):
|
|
25
17
|
query inputs, filtering, sorting, pagination, and result formatting.
|
26
18
|
"""
|
27
19
|
|
28
|
-
inputs:
|
20
|
+
inputs: Dict[str, Any]
|
29
21
|
r"""Input values for the retriever query. These map to the required inputs defined in the retriever's first stage."""
|
30
22
|
filters: NotRequired[Nullable[LogicalOperatorInputTypedDict]]
|
31
23
|
r"""Logical operations for filtering results. Can include AND, OR, NOT conditions with field comparisons."""
|
@@ -51,7 +43,7 @@ class RetrieverQueryRequest(BaseModel):
|
|
51
43
|
query inputs, filtering, sorting, pagination, and result formatting.
|
52
44
|
"""
|
53
45
|
|
54
|
-
inputs:
|
46
|
+
inputs: Dict[str, Any]
|
55
47
|
r"""Input values for the retriever query. These map to the required inputs defined in the retriever's first stage."""
|
56
48
|
|
57
49
|
filters: OptionalNullable[LogicalOperatorInput] = UNSET
|
@@ -1,14 +1,10 @@
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
2
|
|
3
3
|
from __future__ import annotations
|
4
|
-
from .
|
5
|
-
BucketSchemaFieldInput,
|
6
|
-
BucketSchemaFieldInputTypedDict,
|
7
|
-
)
|
4
|
+
from .bucketschemafieldbase import BucketSchemaFieldBase, BucketSchemaFieldBaseTypedDict
|
8
5
|
from .bucketschemafieldtype import BucketSchemaFieldType
|
9
6
|
from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
10
|
-
import
|
11
|
-
from pydantic import ConfigDict, model_serializer
|
7
|
+
from pydantic import model_serializer
|
12
8
|
from typing import Any, Dict, List, Optional
|
13
9
|
from typing_extensions import NotRequired, TypedDict
|
14
10
|
|
@@ -19,8 +15,8 @@ class RetrieverSchemaFieldInputTypedDict(TypedDict):
|
|
19
15
|
type: BucketSchemaFieldType
|
20
16
|
r"""Enum for field types in bucket schemas"""
|
21
17
|
default: NotRequired[Nullable[Any]]
|
22
|
-
items: NotRequired[Nullable[
|
23
|
-
properties: NotRequired[Nullable[Dict[str,
|
18
|
+
items: NotRequired[Nullable[BucketSchemaFieldBaseTypedDict]]
|
19
|
+
properties: NotRequired[Nullable[Dict[str, BucketSchemaFieldBaseTypedDict]]]
|
24
20
|
example: NotRequired[Nullable[Any]]
|
25
21
|
description: NotRequired[Nullable[str]]
|
26
22
|
enum: NotRequired[Nullable[List[Any]]]
|
@@ -31,19 +27,14 @@ class RetrieverSchemaFieldInputTypedDict(TypedDict):
|
|
31
27
|
class RetrieverSchemaFieldInput(BaseModel):
|
32
28
|
r"""Schema field definition for retriever inputs"""
|
33
29
|
|
34
|
-
model_config = ConfigDict(
|
35
|
-
populate_by_name=True, arbitrary_types_allowed=True, extra="allow"
|
36
|
-
)
|
37
|
-
__pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False)
|
38
|
-
|
39
30
|
type: BucketSchemaFieldType
|
40
31
|
r"""Enum for field types in bucket schemas"""
|
41
32
|
|
42
33
|
default: OptionalNullable[Any] = UNSET
|
43
34
|
|
44
|
-
items: OptionalNullable[
|
35
|
+
items: OptionalNullable[BucketSchemaFieldBase] = UNSET
|
45
36
|
|
46
|
-
properties: OptionalNullable[Dict[str,
|
37
|
+
properties: OptionalNullable[Dict[str, BucketSchemaFieldBase]] = UNSET
|
47
38
|
|
48
39
|
example: OptionalNullable[Any] = UNSET
|
49
40
|
|
@@ -54,14 +45,6 @@ class RetrieverSchemaFieldInput(BaseModel):
|
|
54
45
|
required: Optional[bool] = True
|
55
46
|
r"""Whether this field is required for the retriever"""
|
56
47
|
|
57
|
-
@property
|
58
|
-
def additional_properties(self):
|
59
|
-
return self.__pydantic_extra__
|
60
|
-
|
61
|
-
@additional_properties.setter
|
62
|
-
def additional_properties(self, value):
|
63
|
-
self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride]
|
64
|
-
|
65
48
|
@model_serializer(mode="wrap")
|
66
49
|
def serialize_model(self, handler):
|
67
50
|
optional_fields = [
|
@@ -105,7 +88,4 @@ class RetrieverSchemaFieldInput(BaseModel):
|
|
105
88
|
):
|
106
89
|
m[k] = val
|
107
90
|
|
108
|
-
for k, v in serialized.items():
|
109
|
-
m[k] = v
|
110
|
-
|
111
91
|
return m
|
@@ -1,14 +1,10 @@
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
2
|
|
3
3
|
from __future__ import annotations
|
4
|
-
from .
|
5
|
-
BucketSchemaFieldOutput,
|
6
|
-
BucketSchemaFieldOutputTypedDict,
|
7
|
-
)
|
4
|
+
from .bucketschemafieldbase import BucketSchemaFieldBase, BucketSchemaFieldBaseTypedDict
|
8
5
|
from .bucketschemafieldtype import BucketSchemaFieldType
|
9
6
|
from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
10
|
-
import
|
11
|
-
from pydantic import ConfigDict, model_serializer
|
7
|
+
from pydantic import model_serializer
|
12
8
|
from typing import Any, Dict, List, Optional
|
13
9
|
from typing_extensions import NotRequired, TypedDict
|
14
10
|
|
@@ -19,8 +15,8 @@ class RetrieverSchemaFieldOutputTypedDict(TypedDict):
|
|
19
15
|
type: BucketSchemaFieldType
|
20
16
|
r"""Enum for field types in bucket schemas"""
|
21
17
|
default: NotRequired[Nullable[Any]]
|
22
|
-
items: NotRequired[Nullable[
|
23
|
-
properties: NotRequired[Nullable[Dict[str,
|
18
|
+
items: NotRequired[Nullable[BucketSchemaFieldBaseTypedDict]]
|
19
|
+
properties: NotRequired[Nullable[Dict[str, BucketSchemaFieldBaseTypedDict]]]
|
24
20
|
example: NotRequired[Nullable[Any]]
|
25
21
|
description: NotRequired[Nullable[str]]
|
26
22
|
enum: NotRequired[Nullable[List[Any]]]
|
@@ -31,19 +27,14 @@ class RetrieverSchemaFieldOutputTypedDict(TypedDict):
|
|
31
27
|
class RetrieverSchemaFieldOutput(BaseModel):
|
32
28
|
r"""Schema field definition for retriever inputs"""
|
33
29
|
|
34
|
-
model_config = ConfigDict(
|
35
|
-
populate_by_name=True, arbitrary_types_allowed=True, extra="allow"
|
36
|
-
)
|
37
|
-
__pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False)
|
38
|
-
|
39
30
|
type: BucketSchemaFieldType
|
40
31
|
r"""Enum for field types in bucket schemas"""
|
41
32
|
|
42
33
|
default: OptionalNullable[Any] = UNSET
|
43
34
|
|
44
|
-
items: OptionalNullable[
|
35
|
+
items: OptionalNullable[BucketSchemaFieldBase] = UNSET
|
45
36
|
|
46
|
-
properties: OptionalNullable[Dict[str,
|
37
|
+
properties: OptionalNullable[Dict[str, BucketSchemaFieldBase]] = UNSET
|
47
38
|
|
48
39
|
example: OptionalNullable[Any] = UNSET
|
49
40
|
|
@@ -54,14 +45,6 @@ class RetrieverSchemaFieldOutput(BaseModel):
|
|
54
45
|
required: Optional[bool] = True
|
55
46
|
r"""Whether this field is required for the retriever"""
|
56
47
|
|
57
|
-
@property
|
58
|
-
def additional_properties(self):
|
59
|
-
return self.__pydantic_extra__
|
60
|
-
|
61
|
-
@additional_properties.setter
|
62
|
-
def additional_properties(self, value):
|
63
|
-
self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride]
|
64
|
-
|
65
48
|
@model_serializer(mode="wrap")
|
66
49
|
def serialize_model(self, handler):
|
67
50
|
optional_fields = [
|
@@ -105,7 +88,4 @@ class RetrieverSchemaFieldOutput(BaseModel):
|
|
105
88
|
):
|
106
89
|
m[k] = val
|
107
90
|
|
108
|
-
for k, v in serialized.items():
|
109
|
-
m[k] = v
|
110
|
-
|
111
91
|
return m
|
@@ -4,18 +4,10 @@ from __future__ import annotations
|
|
4
4
|
from .interactiontype import InteractionType
|
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 SearchInteractionMetadataTypedDict(TypedDict):
|
12
|
-
pass
|
13
|
-
|
14
|
-
|
15
|
-
class SearchInteractionMetadata(BaseModel):
|
16
|
-
pass
|
17
|
-
|
18
|
-
|
19
11
|
class SearchInteractionTypedDict(TypedDict):
|
20
12
|
feature_id: str
|
21
13
|
r"""ID of the item that was interacted with"""
|
@@ -23,7 +15,7 @@ class SearchInteractionTypedDict(TypedDict):
|
|
23
15
|
r"""Type of interaction or feedback"""
|
24
16
|
position: NotRequired[Nullable[int]]
|
25
17
|
r"""Position in search results where interaction occurred"""
|
26
|
-
metadata: NotRequired[Nullable[
|
18
|
+
metadata: NotRequired[Nullable[Dict[str, Any]]]
|
27
19
|
r"""Additional context about the interaction"""
|
28
20
|
user_id: NotRequired[Nullable[str]]
|
29
21
|
r"""Customer's authenticated user identifier - persists across sessions"""
|
@@ -41,7 +33,7 @@ class SearchInteraction(BaseModel):
|
|
41
33
|
position: OptionalNullable[int] = UNSET
|
42
34
|
r"""Position in search results where interaction occurred"""
|
43
35
|
|
44
|
-
metadata: OptionalNullable[
|
36
|
+
metadata: OptionalNullable[Dict[str, Any]] = UNSET
|
45
37
|
r"""Additional context about the interaction"""
|
46
38
|
|
47
39
|
user_id: OptionalNullable[str] = UNSET
|
@@ -4,18 +4,10 @@ from __future__ import annotations
|
|
4
4
|
from .logicaloperator_input import LogicalOperatorInput, LogicalOperatorInputTypedDict
|
5
5
|
from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
6
6
|
from pydantic import model_serializer
|
7
|
-
from typing import Optional
|
7
|
+
from typing import Any, Dict, Optional
|
8
8
|
from typing_extensions import NotRequired, TypedDict
|
9
9
|
|
10
10
|
|
11
|
-
class StageConfigInputParametersTypedDict(TypedDict):
|
12
|
-
r"""Parameters for the stage"""
|
13
|
-
|
14
|
-
|
15
|
-
class StageConfigInputParameters(BaseModel):
|
16
|
-
r"""Parameters for the stage"""
|
17
|
-
|
18
|
-
|
19
11
|
class StageConfigInputTypedDict(TypedDict):
|
20
12
|
r"""Configuration for how a retriever stage processes queries and handles results.
|
21
13
|
|
@@ -24,13 +16,13 @@ class StageConfigInputTypedDict(TypedDict):
|
|
24
16
|
with consistent options.
|
25
17
|
"""
|
26
18
|
|
19
|
+
stage_id: str
|
20
|
+
r"""Unique identifier for the stage"""
|
27
21
|
stage_name: str
|
28
22
|
r"""Name of the stage"""
|
29
23
|
version: str
|
30
24
|
r"""Version of the stage"""
|
31
|
-
|
32
|
-
r"""Python module path for the stage"""
|
33
|
-
parameters: NotRequired[StageConfigInputParametersTypedDict]
|
25
|
+
parameters: NotRequired[Dict[str, Any]]
|
34
26
|
r"""Parameters for the stage"""
|
35
27
|
pre_filters: NotRequired[Nullable[LogicalOperatorInputTypedDict]]
|
36
28
|
r"""Filters to apply before the main search is executed"""
|
@@ -50,16 +42,16 @@ class StageConfigInput(BaseModel):
|
|
50
42
|
with consistent options.
|
51
43
|
"""
|
52
44
|
|
45
|
+
stage_id: str
|
46
|
+
r"""Unique identifier for the stage"""
|
47
|
+
|
53
48
|
stage_name: str
|
54
49
|
r"""Name of the stage"""
|
55
50
|
|
56
51
|
version: str
|
57
52
|
r"""Version of the stage"""
|
58
53
|
|
59
|
-
|
60
|
-
r"""Python module path for the stage"""
|
61
|
-
|
62
|
-
parameters: Optional[StageConfigInputParameters] = None
|
54
|
+
parameters: Optional[Dict[str, Any]] = None
|
63
55
|
r"""Parameters for the stage"""
|
64
56
|
|
65
57
|
pre_filters: OptionalNullable[LogicalOperatorInput] = UNSET
|
@@ -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
|