nucliadb-models 6.4.2.post4375__py3-none-any.whl → 6.4.2.post4378__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/graph/requests.py +26 -62
- nucliadb_models/search.py +1 -1
- {nucliadb_models-6.4.2.post4375.dist-info → nucliadb_models-6.4.2.post4378.dist-info}/METADATA +1 -1
- {nucliadb_models-6.4.2.post4375.dist-info → nucliadb_models-6.4.2.post4378.dist-info}/RECORD +6 -6
- {nucliadb_models-6.4.2.post4375.dist-info → nucliadb_models-6.4.2.post4378.dist-info}/WHEEL +0 -0
- {nucliadb_models-6.4.2.post4375.dist-info → nucliadb_models-6.4.2.post4378.dist-info}/top_level.txt +0 -0
@@ -107,8 +107,34 @@ class Generated(BaseModel, extra="forbid"):
|
|
107
107
|
## Requests models
|
108
108
|
|
109
109
|
|
110
|
+
class GraphFilterExpression(BaseModel, extra="forbid"):
|
111
|
+
"""Returns only relations from documents that match this filter expression.
|
112
|
+
Filtering examples can be found here: https://docs.nuclia.dev/docs/rag/advanced/search-filters
|
113
|
+
"""
|
114
|
+
|
115
|
+
field: FieldFilterExpression = Field(description="Filter to apply to fields")
|
116
|
+
|
117
|
+
|
110
118
|
class BaseGraphSearchRequest(BaseModel):
|
111
119
|
top_k: int = Field(default=50, title="Number of results to retrieve")
|
120
|
+
filter_expression: Optional[GraphFilterExpression] = Field(
|
121
|
+
default=None,
|
122
|
+
title="Filter resource by an expression",
|
123
|
+
description=(
|
124
|
+
"Returns only relations from documents that match this filter expression."
|
125
|
+
"Filtering examples can be found here: https://docs.nuclia.dev/docs/rag/advanced/search-filters "
|
126
|
+
),
|
127
|
+
)
|
128
|
+
security: Optional[RequestSecurity] = Field(
|
129
|
+
default=None,
|
130
|
+
title="Security",
|
131
|
+
description="Security metadata for the request. If not provided, the search request is done without the security lookup phase.", # noqa: E501
|
132
|
+
)
|
133
|
+
show_hidden: bool = Field(
|
134
|
+
default=False,
|
135
|
+
title="Show hidden resources",
|
136
|
+
description="If set to false (default), excludes hidden resources from search",
|
137
|
+
)
|
112
138
|
|
113
139
|
|
114
140
|
graph_query_discriminator = filter_discriminator
|
@@ -137,34 +163,8 @@ GraphPathQuery = Annotated[
|
|
137
163
|
]
|
138
164
|
|
139
165
|
|
140
|
-
class GraphFilterExpression(BaseModel, extra="forbid"):
|
141
|
-
"""Returns only relations from documents that match this filter expression.
|
142
|
-
Filtering examples can be found here: https://docs.nuclia.dev/docs/rag/advanced/search-filters
|
143
|
-
"""
|
144
|
-
|
145
|
-
field: FieldFilterExpression = Field(description="Filter to apply to fields")
|
146
|
-
|
147
|
-
|
148
166
|
class GraphSearchRequest(BaseGraphSearchRequest):
|
149
167
|
query: GraphPathQuery
|
150
|
-
filter_expression: Optional[GraphFilterExpression] = Field(
|
151
|
-
default=None,
|
152
|
-
title="Filter resource by an expression",
|
153
|
-
description=(
|
154
|
-
"Returns only relations from documents that match this filter expression."
|
155
|
-
"Filtering examples can be found here: https://docs.nuclia.dev/docs/rag/advanced/search-filters "
|
156
|
-
),
|
157
|
-
)
|
158
|
-
security: Optional[RequestSecurity] = Field(
|
159
|
-
default=None,
|
160
|
-
title="Security",
|
161
|
-
description="Security metadata for the request. If not provided, the search request is done without the security lookup phase.", # noqa: E501
|
162
|
-
)
|
163
|
-
show_hidden: bool = Field(
|
164
|
-
default=False,
|
165
|
-
title="Show hidden resources",
|
166
|
-
description="If set to false (default), excludes hidden resources from search",
|
167
|
-
)
|
168
168
|
|
169
169
|
|
170
170
|
# Nodes search
|
@@ -183,24 +183,6 @@ GraphNodesQuery = Annotated[
|
|
183
183
|
|
184
184
|
class GraphNodesSearchRequest(BaseGraphSearchRequest):
|
185
185
|
query: GraphNodesQuery
|
186
|
-
filter_expression: Optional[GraphFilterExpression] = Field(
|
187
|
-
default=None,
|
188
|
-
title="Filter resource by an expression",
|
189
|
-
description=(
|
190
|
-
"Returns only relations from documents that match this filter expression."
|
191
|
-
"Filtering examples can be found here: https://docs.nuclia.dev/docs/rag/advanced/search-filters "
|
192
|
-
),
|
193
|
-
)
|
194
|
-
security: Optional[RequestSecurity] = Field(
|
195
|
-
default=None,
|
196
|
-
title="Security",
|
197
|
-
description="Security metadata for the request. If not provided, the search request is done without the security lookup phase.", # noqa: E501
|
198
|
-
)
|
199
|
-
show_hidden: bool = Field(
|
200
|
-
default=False,
|
201
|
-
title="Show hidden resources",
|
202
|
-
description="If set to false (default), excludes hidden resources from search",
|
203
|
-
)
|
204
186
|
|
205
187
|
|
206
188
|
# Relations search
|
@@ -219,24 +201,6 @@ GraphRelationsQuery = Annotated[
|
|
219
201
|
|
220
202
|
class GraphRelationsSearchRequest(BaseGraphSearchRequest):
|
221
203
|
query: GraphRelationsQuery
|
222
|
-
filter_expression: Optional[GraphFilterExpression] = Field(
|
223
|
-
default=None,
|
224
|
-
title="Filter resource by an expression",
|
225
|
-
description=(
|
226
|
-
"Returns only relations from documents that match this filter expression."
|
227
|
-
"Filtering examples can be found here: https://docs.nuclia.dev/docs/rag/advanced/search-filters "
|
228
|
-
),
|
229
|
-
)
|
230
|
-
security: Optional[RequestSecurity] = Field(
|
231
|
-
default=None,
|
232
|
-
title="Security",
|
233
|
-
description="Security metadata for the request. If not provided, the search request is done without the security lookup phase.", # noqa: E501
|
234
|
-
)
|
235
|
-
show_hidden: bool = Field(
|
236
|
-
default=False,
|
237
|
-
title="Show hidden resources",
|
238
|
-
description="If set to false (default), excludes hidden resources from search",
|
239
|
-
)
|
240
204
|
|
241
205
|
|
242
206
|
# We need this to avoid issues with pydantic and generic types defined in another module
|
nucliadb_models/search.py
CHANGED
@@ -1769,7 +1769,7 @@ class FindRequest(BaseSearchRequest):
|
|
1769
1769
|
query_entities: SkipJsonSchema[Optional[list[KnowledgeGraphEntity]]] = Field(
|
1770
1770
|
default=None, title="Query entities", description="Entities to use in a knowledge graph search"
|
1771
1771
|
)
|
1772
|
-
graph_query:
|
1772
|
+
graph_query: Optional[GraphPathQuery] = Field(
|
1773
1773
|
default=None,
|
1774
1774
|
title="Graph query",
|
1775
1775
|
description="Query for the knowledge graph. Paths (node-relation-node) extracted from a paragraph_id will be used to extend the results",
|
{nucliadb_models-6.4.2.post4375.dist-info → nucliadb_models-6.4.2.post4378.dist-info}/RECORD
RENAMED
@@ -16,7 +16,7 @@ nucliadb_models/notifications.py,sha256=3w1HeX9F8nuA7WupHdpXIksX7d0bHO9ofmemYp4R
|
|
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=Cg7W4Ng7G5UgMOAD-pkSz6fEcaiSTBdju6q8ApUNgag,85393
|
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=KwdP9xSDu1Td2O-7cRXBv_YFF6DsqAlD6M0-4LKAD60,6506
|
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.4.2.
|
36
|
-
nucliadb_models-6.4.2.
|
37
|
-
nucliadb_models-6.4.2.
|
38
|
-
nucliadb_models-6.4.2.
|
35
|
+
nucliadb_models-6.4.2.post4378.dist-info/METADATA,sha256=dwY_lyOcyf9myCoM6z4DUD5TJltA0aTI7XsLXjFoZ1c,776
|
36
|
+
nucliadb_models-6.4.2.post4378.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
37
|
+
nucliadb_models-6.4.2.post4378.dist-info/top_level.txt,sha256=UrY1I8oeovIRwkXLYplssTrxQdUjhSEFDFbnwaIV3tA,16
|
38
|
+
nucliadb_models-6.4.2.post4378.dist-info/RECORD,,
|
File without changes
|
{nucliadb_models-6.4.2.post4375.dist-info → nucliadb_models-6.4.2.post4378.dist-info}/top_level.txt
RENAMED
File without changes
|