nucliadb-models 6.3.4.post3675__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/conversation.py +6 -0
- nucliadb_models/graph/requests.py +5 -3
- nucliadb_models/graph/responses.py +2 -1
- {nucliadb_models-6.3.4.post3675.dist-info → nucliadb_models-6.3.4.post3686.dist-info}/METADATA +1 -1
- {nucliadb_models-6.3.4.post3675.dist-info → nucliadb_models-6.3.4.post3686.dist-info}/RECORD +7 -7
- {nucliadb_models-6.3.4.post3675.dist-info → nucliadb_models-6.3.4.post3686.dist-info}/WHEEL +0 -0
- {nucliadb_models-6.3.4.post3675.dist-info → nucliadb_models-6.3.4.post3686.dist-info}/top_level.txt +0 -0
nucliadb_models/conversation.py
CHANGED
|
@@ -84,6 +84,7 @@ class FieldConversation(BaseModel):
|
|
|
84
84
|
pages: Optional[int] = None
|
|
85
85
|
size: Optional[int] = None
|
|
86
86
|
total: Optional[int] = None
|
|
87
|
+
extract_strategy: Optional[str] = None
|
|
87
88
|
|
|
88
89
|
|
|
89
90
|
# Creation and update classes (Those used on writer endpoints)
|
|
@@ -116,6 +117,10 @@ class InputMessage(BaseModel):
|
|
|
116
117
|
|
|
117
118
|
class InputConversationField(BaseModel):
|
|
118
119
|
messages: List[InputMessage] = []
|
|
120
|
+
extract_strategy: Optional[str] = Field(
|
|
121
|
+
default=None,
|
|
122
|
+
description="Id of the Nuclia extract strategy used at processing time. If not set, the default strategy was used. Extract strategies are defined at the learning configuration api.",
|
|
123
|
+
)
|
|
119
124
|
|
|
120
125
|
|
|
121
126
|
# Processing classes (Those used to sent to push endpoints)
|
|
@@ -145,4 +150,5 @@ class PushMessage(BaseModel):
|
|
|
145
150
|
|
|
146
151
|
class PushConversation(BaseModel):
|
|
147
152
|
messages: List[PushMessage] = []
|
|
153
|
+
extract_strategy: Optional[str] = None
|
|
148
154
|
classification_labels: list[ClassificationLabel] = []
|
|
@@ -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.post3675.dist-info → nucliadb_models-6.3.4.post3686.dist-info}/RECORD
RENAMED
|
@@ -2,7 +2,7 @@ nucliadb_models/__init__.py,sha256=qSmhNKACMwdbU1rklMWlmJKmlRaWvrSksTtwEVkiydQ,1
|
|
|
2
2
|
nucliadb_models/common.py,sha256=JEEY7_AxRCBPHUF6J8XptR_QnGEjRBd02Kqm5WOySYc,7828
|
|
3
3
|
nucliadb_models/configuration.py,sha256=7iUgSCkmFinu6clCfT54P5tuz5Lvf6eJVmahYjwI7qk,2525
|
|
4
4
|
nucliadb_models/content_types.py,sha256=2B3TJpPYJqd-9xGiNiHJFngSIrVyNsZlN4PeB-HafIk,3682
|
|
5
|
-
nucliadb_models/conversation.py,sha256=
|
|
5
|
+
nucliadb_models/conversation.py,sha256=_ubB_22-ovyS8PbRi4TZX5qf1WZ6nAvXIVJtu21BMeM,4339
|
|
6
6
|
nucliadb_models/entities.py,sha256=IqsbF0dSCWkp222sd_R2Ste0iG1eoBPNh1Fh6mNVcu0,2608
|
|
7
7
|
nucliadb_models/export_import.py,sha256=A1KTjwQCRtyVAWcgabXsdltI78rauXBmZX1ie6Rx_pQ,1325
|
|
8
8
|
nucliadb_models/external_index_providers.py,sha256=aVyj-P4kVqfqPjF13E_lUM0FZsq8-DTbIsh-kHOgt2s,1787
|
|
@@ -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.post3675.dist-info → nucliadb_models-6.3.4.post3686.dist-info}/top_level.txt
RENAMED
|
File without changes
|