nucliadb-models 6.3.4.post3680__py3-none-any.whl → 6.3.4.post3686__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.
Potentially problematic release.
This version of nucliadb-models might be problematic. Click here for more details.
- nucliadb_models/graph/requests.py +5 -3
- nucliadb_models/graph/responses.py +2 -1
- {nucliadb_models-6.3.4.post3680.dist-info → nucliadb_models-6.3.4.post3686.dist-info}/METADATA +1 -1
- {nucliadb_models-6.3.4.post3680.dist-info → nucliadb_models-6.3.4.post3686.dist-info}/RECORD +6 -6
- {nucliadb_models-6.3.4.post3680.dist-info → nucliadb_models-6.3.4.post3686.dist-info}/WHEEL +0 -0
- {nucliadb_models-6.3.4.post3680.dist-info → nucliadb_models-6.3.4.post3686.dist-info}/top_level.txt +0 -0
|
@@ -24,7 +24,7 @@ from pydantic import BaseModel, Discriminator, Field, Tag, model_validator
|
|
|
24
24
|
from typing_extensions import Self
|
|
25
25
|
|
|
26
26
|
from nucliadb_models.filters import And, Not, Or, filter_discriminator
|
|
27
|
-
from nucliadb_models.metadata import RelationNodeType
|
|
27
|
+
from nucliadb_models.metadata import RelationNodeType, RelationType
|
|
28
28
|
|
|
29
29
|
## Models for graph nodes and relations
|
|
30
30
|
|
|
@@ -34,7 +34,7 @@ class NodeMatchKind(str, Enum):
|
|
|
34
34
|
FUZZY = "fuzzy"
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
class GraphNode(BaseModel):
|
|
37
|
+
class GraphNode(BaseModel, extra="forbid"):
|
|
38
38
|
value: Optional[str] = None
|
|
39
39
|
match: NodeMatchKind = NodeMatchKind.EXACT
|
|
40
40
|
type: Optional[RelationNodeType] = RelationNodeType.ENTITY
|
|
@@ -53,8 +53,9 @@ class GraphNode(BaseModel):
|
|
|
53
53
|
return self
|
|
54
54
|
|
|
55
55
|
|
|
56
|
-
class GraphRelation(BaseModel):
|
|
56
|
+
class GraphRelation(BaseModel, extra="forbid"):
|
|
57
57
|
label: Optional[str] = None
|
|
58
|
+
type: Optional[RelationType] = None
|
|
58
59
|
|
|
59
60
|
|
|
60
61
|
## Models for query expressions
|
|
@@ -140,6 +141,7 @@ class GraphNodesSearchRequest(BaseGraphSearchRequest):
|
|
|
140
141
|
|
|
141
142
|
GraphRelationsQuery = Annotated[
|
|
142
143
|
Union[
|
|
144
|
+
Annotated[And["GraphRelationsQuery"], Tag("and")],
|
|
143
145
|
Annotated[Or["GraphRelationsQuery"], Tag("or")],
|
|
144
146
|
Annotated[Not["GraphRelationsQuery"], Tag("not")],
|
|
145
147
|
Annotated[Relation, Tag("relation")],
|
|
@@ -21,7 +21,7 @@ from enum import Enum
|
|
|
21
21
|
|
|
22
22
|
from pydantic import BaseModel
|
|
23
23
|
|
|
24
|
-
from nucliadb_models.metadata import RelationNodeType
|
|
24
|
+
from nucliadb_models.metadata import RelationNodeType, RelationType
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
class GraphNode(BaseModel):
|
|
@@ -42,6 +42,7 @@ class PositionedGraphNode(GraphNode):
|
|
|
42
42
|
|
|
43
43
|
class GraphRelation(BaseModel):
|
|
44
44
|
label: str
|
|
45
|
+
type: RelationType
|
|
45
46
|
|
|
46
47
|
|
|
47
48
|
class GraphPath(BaseModel):
|
{nucliadb_models-6.3.4.post3680.dist-info → nucliadb_models-6.3.4.post3686.dist-info}/RECORD
RENAMED
|
@@ -27,12 +27,12 @@ nucliadb_models/vectorsets.py,sha256=avxwO9JPX2k5sCniuNhh2MSsP7aRNvf1eB1-h3-Ju1o
|
|
|
27
27
|
nucliadb_models/writer.py,sha256=OLtCGmicpVf56pXi2_myTAvStpnaBKKOVNtZzHkKKtw,8472
|
|
28
28
|
nucliadb_models/agents/ingestion.py,sha256=mV7gV6VpYg4VNpc59K3275TMUJZbUzeUnp3SZzO5uxY,3137
|
|
29
29
|
nucliadb_models/graph/__init__.py,sha256=eu_1UK7GlBQRg5IRUqJkxVMcBxkXeqX4SZL6fuvwjDg,897
|
|
30
|
-
nucliadb_models/graph/requests.py,sha256=
|
|
31
|
-
nucliadb_models/graph/responses.py,sha256=
|
|
30
|
+
nucliadb_models/graph/requests.py,sha256=XniFIyCRrRgEvrPUUu-Tk2m1TiQ3t8m9xdRe1APGCUE,4540
|
|
31
|
+
nucliadb_models/graph/responses.py,sha256=3aimAHrd3YW1BXHU_ZXRoidlccRtkCcREkfCNotqgIQ,1651
|
|
32
32
|
nucliadb_models/internal/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJn4bIXMa20ks,835
|
|
33
33
|
nucliadb_models/internal/predict.py,sha256=5rgUPrH_98gerySOZ-TR2PX_qzCGF1_8VxyOu3bGhis,2281
|
|
34
34
|
nucliadb_models/internal/shards.py,sha256=uZLsMkYWrJDHq3xy_w7snSeV2X3aDBuht9GC_MG3sKc,1976
|
|
35
|
-
nucliadb_models-6.3.4.
|
|
36
|
-
nucliadb_models-6.3.4.
|
|
37
|
-
nucliadb_models-6.3.4.
|
|
38
|
-
nucliadb_models-6.3.4.
|
|
35
|
+
nucliadb_models-6.3.4.post3686.dist-info/METADATA,sha256=IwB0fQh2W_uzxECRIc19mtsUxTg35FTPFd8grxKuNZI,759
|
|
36
|
+
nucliadb_models-6.3.4.post3686.dist-info/WHEEL,sha256=beeZ86-EfXScwlR_HKu4SllMC9wUEj_8Z_4FJ3egI2w,91
|
|
37
|
+
nucliadb_models-6.3.4.post3686.dist-info/top_level.txt,sha256=UrY1I8oeovIRwkXLYplssTrxQdUjhSEFDFbnwaIV3tA,16
|
|
38
|
+
nucliadb_models-6.3.4.post3686.dist-info/RECORD,,
|
|
File without changes
|
{nucliadb_models-6.3.4.post3680.dist-info → nucliadb_models-6.3.4.post3686.dist-info}/top_level.txt
RENAMED
|
File without changes
|