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
@@ -1,17 +1,22 @@
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
2
|
|
3
3
|
from __future__ import annotations
|
4
|
-
from
|
4
|
+
from .basicfeatureextractor import BasicFeatureExtractor, BasicFeatureExtractorTypedDict
|
5
|
+
from .namespacestatus import NamespaceStatus
|
6
|
+
from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
5
7
|
from pydantic import model_serializer
|
6
8
|
from typing import Any, List
|
7
|
-
from typing_extensions import TypedDict
|
9
|
+
from typing_extensions import NotRequired, TypedDict
|
8
10
|
|
9
11
|
|
10
12
|
class NamespaceResponseTypedDict(TypedDict):
|
11
13
|
namespace_id: str
|
12
14
|
namespace_name: str
|
13
|
-
|
15
|
+
description: Nullable[str]
|
16
|
+
feature_extractors: List[BasicFeatureExtractorTypedDict]
|
14
17
|
payload_indexes: Nullable[List[Any]]
|
18
|
+
status: NamespaceStatus
|
19
|
+
provisioning_task_id: NotRequired[Nullable[str]]
|
15
20
|
|
16
21
|
|
17
22
|
class NamespaceResponse(BaseModel):
|
@@ -19,14 +24,20 @@ class NamespaceResponse(BaseModel):
|
|
19
24
|
|
20
25
|
namespace_name: str
|
21
26
|
|
22
|
-
|
27
|
+
description: Nullable[str]
|
28
|
+
|
29
|
+
feature_extractors: List[BasicFeatureExtractor]
|
23
30
|
|
24
31
|
payload_indexes: Nullable[List[Any]]
|
25
32
|
|
33
|
+
status: NamespaceStatus
|
34
|
+
|
35
|
+
provisioning_task_id: OptionalNullable[str] = UNSET
|
36
|
+
|
26
37
|
@model_serializer(mode="wrap")
|
27
38
|
def serialize_model(self, handler):
|
28
|
-
optional_fields = []
|
29
|
-
nullable_fields = ["payload_indexes"]
|
39
|
+
optional_fields = ["provisioning_task_id"]
|
40
|
+
nullable_fields = ["description", "payload_indexes", "provisioning_task_id"]
|
30
41
|
null_default_fields = []
|
31
42
|
|
32
43
|
serialized = handler(self)
|
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
@@ -1,30 +1,25 @@
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
2
|
|
3
3
|
from __future__ import annotations
|
4
|
-
from .bucketschema_output import BucketSchemaOutput, BucketSchemaOutputTypedDict
|
5
4
|
from .retrievercacheconfig import RetrieverCacheConfig, RetrieverCacheConfigTypedDict
|
5
|
+
from .retrieverschema_output import (
|
6
|
+
RetrieverSchemaOutput,
|
7
|
+
RetrieverSchemaOutputTypedDict,
|
8
|
+
)
|
6
9
|
from .stageconfig_output import StageConfigOutput, StageConfigOutputTypedDict
|
7
10
|
from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
8
11
|
from pydantic import model_serializer
|
9
|
-
from typing import List, Optional
|
12
|
+
from typing import Any, Dict, List, Optional
|
10
13
|
from typing_extensions import NotRequired, TypedDict
|
11
14
|
|
12
15
|
|
13
|
-
class RetrieverModelMetadataTypedDict(TypedDict):
|
14
|
-
pass
|
15
|
-
|
16
|
-
|
17
|
-
class RetrieverModelMetadata(BaseModel):
|
18
|
-
pass
|
19
|
-
|
20
|
-
|
21
16
|
class RetrieverModelTypedDict(TypedDict):
|
22
17
|
r"""Definition of a retriever"""
|
23
18
|
|
24
19
|
retriever_name: str
|
25
20
|
r"""Name of the retriever"""
|
26
|
-
input_schema:
|
27
|
-
r"""Schema definition for
|
21
|
+
input_schema: RetrieverSchemaOutputTypedDict
|
22
|
+
r"""Schema definition for retriever inputs"""
|
28
23
|
collection_ids: List[str]
|
29
24
|
r"""List of collection IDs to search in"""
|
30
25
|
stages: List[StageConfigOutputTypedDict]
|
@@ -33,7 +28,7 @@ class RetrieverModelTypedDict(TypedDict):
|
|
33
28
|
r"""Unique identifier for the retriever"""
|
34
29
|
description: NotRequired[Nullable[str]]
|
35
30
|
r"""Description of the retriever"""
|
36
|
-
metadata: NotRequired[
|
31
|
+
metadata: NotRequired[Dict[str, Any]]
|
37
32
|
cache_config: NotRequired[Nullable[RetrieverCacheConfigTypedDict]]
|
38
33
|
r"""Configuration for retriever-level caching"""
|
39
34
|
|
@@ -44,8 +39,8 @@ class RetrieverModel(BaseModel):
|
|
44
39
|
retriever_name: str
|
45
40
|
r"""Name of the retriever"""
|
46
41
|
|
47
|
-
input_schema:
|
48
|
-
r"""Schema definition for
|
42
|
+
input_schema: RetrieverSchemaOutput
|
43
|
+
r"""Schema definition for retriever inputs"""
|
49
44
|
|
50
45
|
collection_ids: List[str]
|
51
46
|
r"""List of collection IDs to search in"""
|
@@ -59,7 +54,7 @@ class RetrieverModel(BaseModel):
|
|
59
54
|
description: OptionalNullable[str] = UNSET
|
60
55
|
r"""Description of the retriever"""
|
61
56
|
|
62
|
-
metadata: Optional[
|
57
|
+
metadata: Optional[Dict[str, Any]] = None
|
63
58
|
|
64
59
|
cache_config: OptionalNullable[RetrieverCacheConfig] = UNSET
|
65
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
|
@@ -0,0 +1,37 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from .retrieverschemafield_input import (
|
5
|
+
RetrieverSchemaFieldInput,
|
6
|
+
RetrieverSchemaFieldInputTypedDict,
|
7
|
+
)
|
8
|
+
from mixpeek.types import BaseModel
|
9
|
+
import pydantic
|
10
|
+
from pydantic import ConfigDict
|
11
|
+
from typing import Any, Dict
|
12
|
+
from typing_extensions import TypedDict
|
13
|
+
|
14
|
+
|
15
|
+
class RetrieverSchemaInputTypedDict(TypedDict):
|
16
|
+
r"""Schema definition for retriever inputs"""
|
17
|
+
|
18
|
+
properties: Dict[str, RetrieverSchemaFieldInputTypedDict]
|
19
|
+
|
20
|
+
|
21
|
+
class RetrieverSchemaInput(BaseModel):
|
22
|
+
r"""Schema definition for retriever inputs"""
|
23
|
+
|
24
|
+
model_config = ConfigDict(
|
25
|
+
populate_by_name=True, arbitrary_types_allowed=True, extra="allow"
|
26
|
+
)
|
27
|
+
__pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False)
|
28
|
+
|
29
|
+
properties: Dict[str, RetrieverSchemaFieldInput]
|
30
|
+
|
31
|
+
@property
|
32
|
+
def additional_properties(self):
|
33
|
+
return self.__pydantic_extra__
|
34
|
+
|
35
|
+
@additional_properties.setter
|
36
|
+
def additional_properties(self, value):
|
37
|
+
self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride]
|
@@ -0,0 +1,37 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from .retrieverschemafield_output import (
|
5
|
+
RetrieverSchemaFieldOutput,
|
6
|
+
RetrieverSchemaFieldOutputTypedDict,
|
7
|
+
)
|
8
|
+
from mixpeek.types import BaseModel
|
9
|
+
import pydantic
|
10
|
+
from pydantic import ConfigDict
|
11
|
+
from typing import Any, Dict
|
12
|
+
from typing_extensions import TypedDict
|
13
|
+
|
14
|
+
|
15
|
+
class RetrieverSchemaOutputTypedDict(TypedDict):
|
16
|
+
r"""Schema definition for retriever inputs"""
|
17
|
+
|
18
|
+
properties: Dict[str, RetrieverSchemaFieldOutputTypedDict]
|
19
|
+
|
20
|
+
|
21
|
+
class RetrieverSchemaOutput(BaseModel):
|
22
|
+
r"""Schema definition for retriever inputs"""
|
23
|
+
|
24
|
+
model_config = ConfigDict(
|
25
|
+
populate_by_name=True, arbitrary_types_allowed=True, extra="allow"
|
26
|
+
)
|
27
|
+
__pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False)
|
28
|
+
|
29
|
+
properties: Dict[str, RetrieverSchemaFieldOutput]
|
30
|
+
|
31
|
+
@property
|
32
|
+
def additional_properties(self):
|
33
|
+
return self.__pydantic_extra__
|
34
|
+
|
35
|
+
@additional_properties.setter
|
36
|
+
def additional_properties(self, value):
|
37
|
+
self.__pydantic_extra__ = value # pyright: ignore[reportIncompatibleVariableOverride]
|
@@ -0,0 +1,91 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from .bucketschemafieldbase import BucketSchemaFieldBase, BucketSchemaFieldBaseTypedDict
|
5
|
+
from .bucketschemafieldtype import BucketSchemaFieldType
|
6
|
+
from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
7
|
+
from pydantic import model_serializer
|
8
|
+
from typing import Any, Dict, List, Optional
|
9
|
+
from typing_extensions import NotRequired, TypedDict
|
10
|
+
|
11
|
+
|
12
|
+
class RetrieverSchemaFieldInputTypedDict(TypedDict):
|
13
|
+
r"""Schema field definition for retriever inputs"""
|
14
|
+
|
15
|
+
type: BucketSchemaFieldType
|
16
|
+
r"""Enum for field types in bucket schemas"""
|
17
|
+
default: NotRequired[Nullable[Any]]
|
18
|
+
items: NotRequired[Nullable[BucketSchemaFieldBaseTypedDict]]
|
19
|
+
properties: NotRequired[Nullable[Dict[str, BucketSchemaFieldBaseTypedDict]]]
|
20
|
+
example: NotRequired[Nullable[Any]]
|
21
|
+
description: NotRequired[Nullable[str]]
|
22
|
+
enum: NotRequired[Nullable[List[Any]]]
|
23
|
+
required: NotRequired[bool]
|
24
|
+
r"""Whether this field is required for the retriever"""
|
25
|
+
|
26
|
+
|
27
|
+
class RetrieverSchemaFieldInput(BaseModel):
|
28
|
+
r"""Schema field definition for retriever inputs"""
|
29
|
+
|
30
|
+
type: BucketSchemaFieldType
|
31
|
+
r"""Enum for field types in bucket schemas"""
|
32
|
+
|
33
|
+
default: OptionalNullable[Any] = UNSET
|
34
|
+
|
35
|
+
items: OptionalNullable[BucketSchemaFieldBase] = UNSET
|
36
|
+
|
37
|
+
properties: OptionalNullable[Dict[str, BucketSchemaFieldBase]] = UNSET
|
38
|
+
|
39
|
+
example: OptionalNullable[Any] = UNSET
|
40
|
+
|
41
|
+
description: OptionalNullable[str] = UNSET
|
42
|
+
|
43
|
+
enum: OptionalNullable[List[Any]] = UNSET
|
44
|
+
|
45
|
+
required: Optional[bool] = True
|
46
|
+
r"""Whether this field is required for the retriever"""
|
47
|
+
|
48
|
+
@model_serializer(mode="wrap")
|
49
|
+
def serialize_model(self, handler):
|
50
|
+
optional_fields = [
|
51
|
+
"default",
|
52
|
+
"items",
|
53
|
+
"properties",
|
54
|
+
"example",
|
55
|
+
"description",
|
56
|
+
"enum",
|
57
|
+
"required",
|
58
|
+
]
|
59
|
+
nullable_fields = [
|
60
|
+
"default",
|
61
|
+
"items",
|
62
|
+
"properties",
|
63
|
+
"example",
|
64
|
+
"description",
|
65
|
+
"enum",
|
66
|
+
]
|
67
|
+
null_default_fields = []
|
68
|
+
|
69
|
+
serialized = handler(self)
|
70
|
+
|
71
|
+
m = {}
|
72
|
+
|
73
|
+
for n, f in type(self).model_fields.items():
|
74
|
+
k = f.alias or n
|
75
|
+
val = serialized.get(k)
|
76
|
+
serialized.pop(k, None)
|
77
|
+
|
78
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
79
|
+
is_set = (
|
80
|
+
self.__pydantic_fields_set__.intersection({n})
|
81
|
+
or k in null_default_fields
|
82
|
+
) # pylint: disable=no-member
|
83
|
+
|
84
|
+
if val is not None and val != UNSET_SENTINEL:
|
85
|
+
m[k] = val
|
86
|
+
elif val != UNSET_SENTINEL and (
|
87
|
+
not k in optional_fields or (optional_nullable and is_set)
|
88
|
+
):
|
89
|
+
m[k] = val
|
90
|
+
|
91
|
+
return m
|
@@ -0,0 +1,91 @@
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
2
|
+
|
3
|
+
from __future__ import annotations
|
4
|
+
from .bucketschemafieldbase import BucketSchemaFieldBase, BucketSchemaFieldBaseTypedDict
|
5
|
+
from .bucketschemafieldtype import BucketSchemaFieldType
|
6
|
+
from mixpeek.types import BaseModel, Nullable, OptionalNullable, UNSET, UNSET_SENTINEL
|
7
|
+
from pydantic import model_serializer
|
8
|
+
from typing import Any, Dict, List, Optional
|
9
|
+
from typing_extensions import NotRequired, TypedDict
|
10
|
+
|
11
|
+
|
12
|
+
class RetrieverSchemaFieldOutputTypedDict(TypedDict):
|
13
|
+
r"""Schema field definition for retriever inputs"""
|
14
|
+
|
15
|
+
type: BucketSchemaFieldType
|
16
|
+
r"""Enum for field types in bucket schemas"""
|
17
|
+
default: NotRequired[Nullable[Any]]
|
18
|
+
items: NotRequired[Nullable[BucketSchemaFieldBaseTypedDict]]
|
19
|
+
properties: NotRequired[Nullable[Dict[str, BucketSchemaFieldBaseTypedDict]]]
|
20
|
+
example: NotRequired[Nullable[Any]]
|
21
|
+
description: NotRequired[Nullable[str]]
|
22
|
+
enum: NotRequired[Nullable[List[Any]]]
|
23
|
+
required: NotRequired[bool]
|
24
|
+
r"""Whether this field is required for the retriever"""
|
25
|
+
|
26
|
+
|
27
|
+
class RetrieverSchemaFieldOutput(BaseModel):
|
28
|
+
r"""Schema field definition for retriever inputs"""
|
29
|
+
|
30
|
+
type: BucketSchemaFieldType
|
31
|
+
r"""Enum for field types in bucket schemas"""
|
32
|
+
|
33
|
+
default: OptionalNullable[Any] = UNSET
|
34
|
+
|
35
|
+
items: OptionalNullable[BucketSchemaFieldBase] = UNSET
|
36
|
+
|
37
|
+
properties: OptionalNullable[Dict[str, BucketSchemaFieldBase]] = UNSET
|
38
|
+
|
39
|
+
example: OptionalNullable[Any] = UNSET
|
40
|
+
|
41
|
+
description: OptionalNullable[str] = UNSET
|
42
|
+
|
43
|
+
enum: OptionalNullable[List[Any]] = UNSET
|
44
|
+
|
45
|
+
required: Optional[bool] = True
|
46
|
+
r"""Whether this field is required for the retriever"""
|
47
|
+
|
48
|
+
@model_serializer(mode="wrap")
|
49
|
+
def serialize_model(self, handler):
|
50
|
+
optional_fields = [
|
51
|
+
"default",
|
52
|
+
"items",
|
53
|
+
"properties",
|
54
|
+
"example",
|
55
|
+
"description",
|
56
|
+
"enum",
|
57
|
+
"required",
|
58
|
+
]
|
59
|
+
nullable_fields = [
|
60
|
+
"default",
|
61
|
+
"items",
|
62
|
+
"properties",
|
63
|
+
"example",
|
64
|
+
"description",
|
65
|
+
"enum",
|
66
|
+
]
|
67
|
+
null_default_fields = []
|
68
|
+
|
69
|
+
serialized = handler(self)
|
70
|
+
|
71
|
+
m = {}
|
72
|
+
|
73
|
+
for n, f in type(self).model_fields.items():
|
74
|
+
k = f.alias or n
|
75
|
+
val = serialized.get(k)
|
76
|
+
serialized.pop(k, None)
|
77
|
+
|
78
|
+
optional_nullable = k in optional_fields and k in nullable_fields
|
79
|
+
is_set = (
|
80
|
+
self.__pydantic_fields_set__.intersection({n})
|
81
|
+
or k in null_default_fields
|
82
|
+
) # pylint: disable=no-member
|
83
|
+
|
84
|
+
if val is not None and val != UNSET_SENTINEL:
|
85
|
+
m[k] = val
|
86
|
+
elif val != UNSET_SENTINEL and (
|
87
|
+
not k in optional_fields or (optional_nullable and is_set)
|
88
|
+
):
|
89
|
+
m[k] = val
|
90
|
+
|
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
|