nucliadb-models 6.6.1.post4616__py3-none-any.whl → 6.6.1.post4619__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.
- nucliadb_models/common.py +2 -2
- nucliadb_models/configuration.py +9 -15
- nucliadb_models/conversation.py +1 -1
- nucliadb_models/file.py +1 -1
- nucliadb_models/filters.py +1 -1
- nucliadb_models/graph/requests.py +2 -2
- nucliadb_models/metadata.py +1 -1
- nucliadb_models/notifications.py +2 -1
- nucliadb_models/search.py +2 -2
- {nucliadb_models-6.6.1.post4616.dist-info → nucliadb_models-6.6.1.post4619.dist-info}/METADATA +1 -1
- {nucliadb_models-6.6.1.post4616.dist-info → nucliadb_models-6.6.1.post4619.dist-info}/RECORD +13 -13
- {nucliadb_models-6.6.1.post4616.dist-info → nucliadb_models-6.6.1.post4619.dist-info}/WHEEL +0 -0
- {nucliadb_models-6.6.1.post4616.dist-info → nucliadb_models-6.6.1.post4619.dist-info}/top_level.txt +0 -0
nucliadb_models/common.py
CHANGED
@@ -88,7 +88,7 @@ class FieldID(BaseModel):
|
|
88
88
|
class File(BaseModel):
|
89
89
|
filename: Optional[str] = None
|
90
90
|
content_type: str = "application/octet-stream"
|
91
|
-
payload: Optional[str] = Field(None, description="Base64 encoded file content")
|
91
|
+
payload: Optional[str] = Field(default=None, description="Base64 encoded file content")
|
92
92
|
md5: Optional[str] = None
|
93
93
|
# These are to be used for external files
|
94
94
|
uri: Optional[str] = None
|
@@ -176,7 +176,7 @@ class CloudLink(BaseModel):
|
|
176
176
|
return DOWNLOAD_URI.format(**url_params).rstrip("/")
|
177
177
|
|
178
178
|
@field_serializer("uri")
|
179
|
-
def serialize_uri(uri):
|
179
|
+
def serialize_uri(self, uri: str):
|
180
180
|
return CloudLink.format_reader_download_uri(uri)
|
181
181
|
|
182
182
|
|
nucliadb_models/configuration.py
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
#
|
15
15
|
|
16
16
|
import warnings
|
17
|
-
from typing import Annotated, Literal, Optional, Union
|
17
|
+
from typing import Annotated, Any, Literal, Optional, Union
|
18
18
|
|
19
19
|
from pydantic import BaseModel, Field, create_model
|
20
20
|
|
@@ -38,16 +38,14 @@ class KBConfiguration(BaseModel):
|
|
38
38
|
#
|
39
39
|
# Search configurations
|
40
40
|
#
|
41
|
+
def _model_fields(model: type[BaseModel], skip: list[str]) -> dict[str, Any]:
|
42
|
+
return {
|
43
|
+
name: (field.annotation, field) for name, field in model.model_fields.items() if name not in skip
|
44
|
+
}
|
45
|
+
|
41
46
|
|
42
47
|
# FindConfig is a FindConfig without `search_configuration`
|
43
|
-
FindConfig = create_model(
|
44
|
-
"FindConfig",
|
45
|
-
**{
|
46
|
-
name: (field.annotation, field)
|
47
|
-
for name, field in FindRequest.model_fields.items()
|
48
|
-
if name not in ("search_configuration")
|
49
|
-
},
|
50
|
-
) # type: ignore[call-overload]
|
48
|
+
FindConfig = create_model("FindConfig", **_model_fields(FindRequest, skip=["search_configuration"]))
|
51
49
|
|
52
50
|
|
53
51
|
class FindSearchConfiguration(BaseModel):
|
@@ -58,13 +56,9 @@ class FindSearchConfiguration(BaseModel):
|
|
58
56
|
# AskConfig is an AskRequest where `query` is not mandatory and without `search_configuration`
|
59
57
|
AskConfig = create_model(
|
60
58
|
"AskConfig",
|
61
|
-
**
|
62
|
-
name: (field.annotation, field)
|
63
|
-
for name, field in AskRequest.model_fields.items()
|
64
|
-
if name not in ("query", "search_configuration")
|
65
|
-
},
|
59
|
+
**_model_fields(AskRequest, skip=["query", "search_configuration"]),
|
66
60
|
query=(Optional[str], None),
|
67
|
-
)
|
61
|
+
)
|
68
62
|
|
69
63
|
|
70
64
|
class AskSearchConfiguration(BaseModel):
|
nucliadb_models/conversation.py
CHANGED
@@ -18,7 +18,7 @@ from typing import List, Optional
|
|
18
18
|
|
19
19
|
from pydantic import BaseModel, Field, field_validator
|
20
20
|
|
21
|
-
from nucliadb_models import CloudLink, FieldRef, FileB64
|
21
|
+
from nucliadb_models.common import CloudLink, FieldRef, FileB64
|
22
22
|
from nucliadb_models.utils import DateTime
|
23
23
|
|
24
24
|
# Shared classes
|
nucliadb_models/file.py
CHANGED
nucliadb_models/filters.py
CHANGED
@@ -13,7 +13,7 @@
|
|
13
13
|
# limitations under the License.
|
14
14
|
#
|
15
15
|
from enum import Enum
|
16
|
-
from typing import Annotated, Literal, Optional, Union
|
16
|
+
from typing import Annotated, Any, Literal, Optional, Union
|
17
17
|
|
18
18
|
from pydantic import BaseModel, Discriminator, Field, Tag, model_validator
|
19
19
|
from typing_extensions import Self
|
@@ -26,7 +26,7 @@ from nucliadb_models.security import RequestSecurity
|
|
26
26
|
|
27
27
|
|
28
28
|
class GraphProp(BaseModel):
|
29
|
-
prop:
|
29
|
+
prop: Any
|
30
30
|
|
31
31
|
@model_validator(mode="after")
|
32
32
|
def set_discriminator(self) -> Self:
|
nucliadb_models/metadata.py
CHANGED
@@ -73,7 +73,7 @@ class Relation(BaseModel):
|
|
73
73
|
label: Optional[str] = None
|
74
74
|
metadata: Optional[RelationMetadata] = None
|
75
75
|
|
76
|
-
from_: Optional[RelationEntity] = Field(None, alias="from")
|
76
|
+
from_: Optional[RelationEntity] = Field(default=None, alias="from")
|
77
77
|
to: RelationEntity
|
78
78
|
|
79
79
|
@model_validator(mode="after")
|
nucliadb_models/notifications.py
CHANGED
@@ -13,6 +13,7 @@
|
|
13
13
|
# limitations under the License.
|
14
14
|
#
|
15
15
|
from enum import Enum
|
16
|
+
from typing import Any
|
16
17
|
|
17
18
|
from pydantic import BaseModel, Field
|
18
19
|
|
@@ -29,7 +30,7 @@ class Notification(BaseModel):
|
|
29
30
|
title="Notification Type",
|
30
31
|
description="Type of notification.",
|
31
32
|
)
|
32
|
-
data:
|
33
|
+
data: Any = Field(
|
33
34
|
...,
|
34
35
|
title="Notification Data",
|
35
36
|
description="Notification data.",
|
nucliadb_models/search.py
CHANGED
@@ -1100,7 +1100,7 @@ class ImageRagStrategyName:
|
|
1100
1100
|
|
1101
1101
|
|
1102
1102
|
class RagStrategy(BaseModel):
|
1103
|
-
name:
|
1103
|
+
name: Any
|
1104
1104
|
|
1105
1105
|
@model_validator(mode="after")
|
1106
1106
|
def set_discriminator(self) -> Self:
|
@@ -1110,7 +1110,7 @@ class RagStrategy(BaseModel):
|
|
1110
1110
|
|
1111
1111
|
|
1112
1112
|
class ImageRagStrategy(BaseModel):
|
1113
|
-
name:
|
1113
|
+
name: Any
|
1114
1114
|
|
1115
1115
|
@model_validator(mode="after")
|
1116
1116
|
def set_discriminator(self) -> Self:
|
{nucliadb_models-6.6.1.post4616.dist-info → nucliadb_models-6.6.1.post4619.dist-info}/RECORD
RENAMED
@@ -1,22 +1,22 @@
|
|
1
1
|
nucliadb_models/__init__.py,sha256=3y8-htogKuCZcbhaUZdSjTeEjUSeec9aRWyL8AlKCyM,1077
|
2
|
-
nucliadb_models/common.py,sha256=
|
3
|
-
nucliadb_models/configuration.py,sha256=
|
2
|
+
nucliadb_models/common.py,sha256=YW84w1NAQARObs2nXw6YBgdxQJeVCmTZZr5lSqj-IdQ,7904
|
3
|
+
nucliadb_models/configuration.py,sha256=aTV5mBwYFlwiV1_nWyVAXaCh7F6lDVTVh28Xfwy8ox8,2448
|
4
4
|
nucliadb_models/content_types.py,sha256=eMlBhWwzfYJFlErcWsNCvBdypbv8J9eC-MXw727QiBE,3430
|
5
|
-
nucliadb_models/conversation.py,sha256=
|
5
|
+
nucliadb_models/conversation.py,sha256=2igXbzF7kfnOd6qjY-b0AZSAjI7O3sLpL0Cp-uSfJvA,3390
|
6
6
|
nucliadb_models/entities.py,sha256=i-7Y8qmFRRTih5zw0ajv1U_iiXexe66M3TK8hUikQZk,2356
|
7
7
|
nucliadb_models/export_import.py,sha256=mNm9IArOLnC6TLupkwqVFhxD5d08mpIVOVFneECv8UA,1073
|
8
8
|
nucliadb_models/external_index_providers.py,sha256=IIKjJjLixWQC1zrbzam2FDcAo5UUxShZfueZSxqZu8Y,1535
|
9
9
|
nucliadb_models/extracted.py,sha256=Zh79jrOcqedVYc36qM4D5qrOn5RutTuJAHusEeyIDiU,6245
|
10
|
-
nucliadb_models/file.py,sha256=
|
11
|
-
nucliadb_models/filters.py,sha256=
|
10
|
+
nucliadb_models/file.py,sha256=ZfxnXeigmMkoZ5ae22g-JvlYf8UBz4-pkx1t7aOL8Rs,1747
|
11
|
+
nucliadb_models/filters.py,sha256=NQI2-4AFzzJuZy8NeY3jXlTbbU5wxiwMCP-5DrD-7lE,14759
|
12
12
|
nucliadb_models/labels.py,sha256=9zqRgkpZuX3kUPwsTTgCH7JyOWK7dM5pwyuHJR86YdU,3949
|
13
13
|
nucliadb_models/link.py,sha256=cfMOwaKDnaYSMxD5QClBu2Ab1orGfuTurFqNozp3KFk,2010
|
14
|
-
nucliadb_models/metadata.py,sha256=
|
15
|
-
nucliadb_models/notifications.py,sha256=
|
14
|
+
nucliadb_models/metadata.py,sha256=MFVYnpXMBoY4ylMg029o7yDKGxhK7NB0c0FSshzJHm4,8356
|
15
|
+
nucliadb_models/notifications.py,sha256=mna8-AoD_29Wds0Thl0AF0zpERnJmYGLZX1w1fUopMY,4036
|
16
16
|
nucliadb_models/processing.py,sha256=nhKuHQjqCdb9zJVkYGPTLub23tK9e_lwL5OCDVymZjY,719
|
17
17
|
nucliadb_models/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
18
18
|
nucliadb_models/resource.py,sha256=FkhwmbjoqQBGyKQIqa40WK2Vq3wtryZeIVWmJ4b-84g,9003
|
19
|
-
nucliadb_models/search.py,sha256=
|
19
|
+
nucliadb_models/search.py,sha256=UtENf6-osZ6TvV7EzqrBN67GfZtrBhCZEo3qBi15ejs,91648
|
20
20
|
nucliadb_models/security.py,sha256=opxaDLfvk3aU0sjesK0jGrYLx5h4YCwlKKN0moYs_ig,1150
|
21
21
|
nucliadb_models/synonyms.py,sha256=afbaVqSQSxGLwi2PusVaLSRpkOtA5AZmWOKd1f4nl2E,690
|
22
22
|
nucliadb_models/text.py,sha256=kY2ub7AaGm-4vNaLX3Ju2VvRw-eKZ2LRdM9z7XCNaG0,2898
|
@@ -27,12 +27,12 @@ nucliadb_models/vectorsets.py,sha256=XAgg9DfdfLYpfLh9OepJ_KPH0_RqRQNpVZJr74UnNh0
|
|
27
27
|
nucliadb_models/writer.py,sha256=diwrarp6DxjSUoRmdEljZb68z_ghNvpOgPUGZeKg328,8220
|
28
28
|
nucliadb_models/agents/ingestion.py,sha256=W9cJ0dQT_1vPcjeJ4_Fjb8DylnhQ6qqZrY4v8x1RqUs,3093
|
29
29
|
nucliadb_models/graph/__init__.py,sha256=X538kZPZnndmQeEtnzzPv1hYVGUTDe9U1O7UmAqqxXU,645
|
30
|
-
nucliadb_models/graph/requests.py,sha256=
|
30
|
+
nucliadb_models/graph/requests.py,sha256=ppQ7cOnybvrw1wGC7qDps-182PfmicWU6-4vLRfK16w,7169
|
31
31
|
nucliadb_models/graph/responses.py,sha256=Sdq8OgFAL1YT-1lJyLLrkqcScvj7YTEqAUwQ-kFAk9M,1399
|
32
32
|
nucliadb_models/internal/__init__.py,sha256=zG33bUz1rHFPtvqQPWn4rDwBJt3FJodGuQYD45quiQg,583
|
33
33
|
nucliadb_models/internal/predict.py,sha256=Pnx6MmLfK65eExe1XnVxqmSlvMwdowewwks9BOEoqMw,2029
|
34
34
|
nucliadb_models/internal/shards.py,sha256=__y1OZtWGiNcPQEWfSFOj8yw458WGi7mM4vZe0K-L1Y,1691
|
35
|
-
nucliadb_models-6.6.1.
|
36
|
-
nucliadb_models-6.6.1.
|
37
|
-
nucliadb_models-6.6.1.
|
38
|
-
nucliadb_models-6.6.1.
|
35
|
+
nucliadb_models-6.6.1.post4619.dist-info/METADATA,sha256=hZGEVTUvldOrUo4mSBzFTFfGyypwQEVikkxN8c5kCAs,794
|
36
|
+
nucliadb_models-6.6.1.post4619.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
37
|
+
nucliadb_models-6.6.1.post4619.dist-info/top_level.txt,sha256=UrY1I8oeovIRwkXLYplssTrxQdUjhSEFDFbnwaIV3tA,16
|
38
|
+
nucliadb_models-6.6.1.post4619.dist-info/RECORD,,
|
File without changes
|
{nucliadb_models-6.6.1.post4616.dist-info → nucliadb_models-6.6.1.post4619.dist-info}/top_level.txt
RENAMED
File without changes
|