nucliadb 6.4.2.post4374__py3-none-any.whl → 6.4.2.post4376__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.
@@ -92,7 +92,11 @@ async def _run_agents_endpoint(
92
92
  ) -> Union[ResourceAgentsResponse, HTTPClientError]:
93
93
  try:
94
94
  run_agents_response: RunAgentsResponse = await run_agents(
95
- kbid, resource_id, user_id, filters=item.filters
95
+ kbid,
96
+ resource_id,
97
+ user_id,
98
+ filters=item.filters,
99
+ agent_ids=item.agent_ids,
96
100
  )
97
101
  except ResourceNotFoundError:
98
102
  return HTTPClientError(status_code=404, detail="Resource not found")
@@ -72,6 +72,10 @@ class RunAgentsRequest(BaseModel):
72
72
  title="The fields to be augmented with the Knowledge Box's Data Augmentation Agents",
73
73
  )
74
74
  user_id: str = Field(..., title="The user ID of the user making the request")
75
+ agent_ids: list[str] = Field(
76
+ default_factory=list,
77
+ title="An optional list of Data Augmentation Agent IDs to run. If empty, all configured agents that match the filters are run.",
78
+ )
75
79
  filters: Optional[list[NameOperationFilter]] = Field(
76
80
  default=None,
77
81
  title="Filters to select which Data Augmentation Agents are applied to the text. If empty, all configured agents for the Knowledge Box are applied.",
@@ -37,11 +37,20 @@ from nucliadb_protos.resources_pb2 import FieldMetadata
37
37
 
38
38
 
39
39
  async def run_agents(
40
- kbid: str, rid: str, user_id: str, filters: Optional[list[AgentsFilter]] = None
40
+ kbid: str,
41
+ rid: str,
42
+ user_id: str,
43
+ filters: Optional[list[AgentsFilter]] = None,
44
+ agent_ids: Optional[list[str]] = None,
41
45
  ) -> RunAgentsResponse:
42
46
  fields = await fetch_resource_fields(kbid, rid)
43
47
 
44
- item = RunAgentsRequest(user_id=user_id, filters=_parse_filters(filters), fields=fields)
48
+ item = RunAgentsRequest(
49
+ user_id=user_id,
50
+ filters=_parse_filters(filters),
51
+ fields=fields,
52
+ agent_ids=agent_ids if agent_ids else [],
53
+ )
45
54
 
46
55
  predict = get_predict()
47
56
  return await predict.run_agents(kbid, item)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nucliadb
3
- Version: 6.4.2.post4374
3
+ Version: 6.4.2.post4376
4
4
  Summary: NucliaDB
5
5
  Author-email: Nuclia <nucliadb@nuclia.com>
6
6
  License-Expression: AGPL-3.0-or-later
@@ -19,11 +19,11 @@ Classifier: Programming Language :: Python :: 3.12
19
19
  Classifier: Programming Language :: Python :: 3 :: Only
20
20
  Requires-Python: <4,>=3.9
21
21
  Description-Content-Type: text/markdown
22
- Requires-Dist: nucliadb-telemetry[all]>=6.4.2.post4374
23
- Requires-Dist: nucliadb-utils[cache,fastapi,storages]>=6.4.2.post4374
24
- Requires-Dist: nucliadb-protos>=6.4.2.post4374
25
- Requires-Dist: nucliadb-models>=6.4.2.post4374
26
- Requires-Dist: nidx-protos>=6.4.2.post4374
22
+ Requires-Dist: nucliadb-telemetry[all]>=6.4.2.post4376
23
+ Requires-Dist: nucliadb-utils[cache,fastapi,storages]>=6.4.2.post4376
24
+ Requires-Dist: nucliadb-protos>=6.4.2.post4376
25
+ Requires-Dist: nucliadb-models>=6.4.2.post4376
26
+ Requires-Dist: nidx-protos>=6.4.2.post4376
27
27
  Requires-Dist: nucliadb-admin-assets>=1.0.0.post1224
28
28
  Requires-Dist: nuclia-models>=0.24.2
29
29
  Requires-Dist: uvicorn[standard]
@@ -205,7 +205,7 @@ nucliadb/search/app.py,sha256=-WEX1AZRA8R_9aeOo9ovOTwjXW_7VfwWN7N2ccSoqXg,3387
205
205
  nucliadb/search/lifecycle.py,sha256=hiylV-lxsAWkqTCulXBg0EIfMQdejSr8Zar0L_GLFT8,2218
206
206
  nucliadb/search/openapi.py,sha256=t3Wo_4baTrfPftg2BHsyLWNZ1MYn7ZRdW7ht-wFOgRs,1016
207
207
  nucliadb/search/predict.py,sha256=__0qwIU2CIRYRTYsbG9zZEjXXrxNe8puZWYJIyOT6dg,23492
208
- nucliadb/search/predict_models.py,sha256=ZAe0dneUsPmV9uBar57cCFADCGOrYDsJHuqKlA5zWag,5937
208
+ nucliadb/search/predict_models.py,sha256=pm4ykuWH9bTXxj5RlI2F6pmXSXOVt64WL_sRlc2u6Tk,6144
209
209
  nucliadb/search/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
210
210
  nucliadb/search/run.py,sha256=aFb-CXRi_C8YMpP_ivNj8KW1BYhADj88y8K9Lr_nUPI,1402
211
211
  nucliadb/search/settings.py,sha256=vem3EcyYlTPSim0kEK-xe-erF4BZg0CT_LAb8ZRQAE8,1684
@@ -226,7 +226,7 @@ nucliadb/search/api/v1/summarize.py,sha256=VAHJvE6V3xUgEBfqNKhgoxmDqCvh30RnrEIBV
226
226
  nucliadb/search/api/v1/utils.py,sha256=5Ve-frn7LAE2jqAgB85F8RSeqxDlyA08--gS-AdOLS4,1434
227
227
  nucliadb/search/api/v1/resource/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJn4bIXMa20ks,835
228
228
  nucliadb/search/api/v1/resource/ask.py,sha256=nsVzBSanSSlf0Ody6LSTjdEy75Vg283_YhbkAtWEjh8,3637
229
- nucliadb/search/api/v1/resource/ingestion_agents.py,sha256=fqqRCd8Wc9GciS5P98lcnihvTKStsZYYtOU-T1bc-6E,4771
229
+ nucliadb/search/api/v1/resource/ingestion_agents.py,sha256=AZ5_cH1jbf7d5wh_gz6EHLEKAzEOMrQZwEZAu1Q_3FE,4846
230
230
  nucliadb/search/api/v1/resource/search.py,sha256=Gnn4CY5NO4AK5ZWwrSIRJqBDm16u8k0XtpUwDXEBeYY,4930
231
231
  nucliadb/search/api/v1/resource/utils.py,sha256=-NjZqAQtFEXKpIh8ui5S26ItnJ5rzmmG0BHxGSS9QPw,1141
232
232
  nucliadb/search/requesters/__init__.py,sha256=itSI7dtTwFP55YMX4iK7JzdMHS5CQVUiB1XzQu4UBh8,833
@@ -242,7 +242,7 @@ nucliadb/search/search/find_merge.py,sha256=c-7IlfjfdmWAvQOyM7IO3bKS1EQpnR4oi6pN
242
242
  nucliadb/search/search/graph_merge.py,sha256=y5V7X-BhjHsKDXE69tzQLIIKGm4XuaFrZXw0odcHVNM,3402
243
243
  nucliadb/search/search/graph_strategy.py,sha256=7ERzGLshrrpuu7m3PauPaK89fzyrT2oDNVhOMnCjka0,36043
244
244
  nucliadb/search/search/hydrator.py,sha256=-R37gCrGxkyaiHQalnTWHNG_FCx11Zucd7qA1vQCxuw,6985
245
- nucliadb/search/search/ingestion_agents.py,sha256=NeJr4EEX-bvFFMGvXOOwLv8uU7NuQ-ntJnnrhnKfMzY,3174
245
+ nucliadb/search/search/ingestion_agents.py,sha256=IK6yOPEF9rST_uoqspdVdPk0pldjDhc8Fz1eRovnySI,3311
246
246
  nucliadb/search/search/merge.py,sha256=XiRBsxhYPshPV7lZXD-9E259KZOPIf4I2tKosY0lPo4,22470
247
247
  nucliadb/search/search/metrics.py,sha256=3I6IN0qDSmqIvUaWJmT3rt-Jyjs6LcvnKI8ZqCiuJPY,3501
248
248
  nucliadb/search/search/paragraphs.py,sha256=pNAEiYqJGGUVcEf7xf-PFMVqz0PX4Qb-WNG-_zPGN2o,7799
@@ -368,8 +368,8 @@ nucliadb/writer/tus/local.py,sha256=7jYa_w9b-N90jWgN2sQKkNcomqn6JMVBOVeDOVYJHto,
368
368
  nucliadb/writer/tus/s3.py,sha256=vF0NkFTXiXhXq3bCVXXVV-ED38ECVoUeeYViP8uMqcU,8357
369
369
  nucliadb/writer/tus/storage.py,sha256=ToqwjoYnjI4oIcwzkhha_MPxi-k4Jk3Lt55zRwaC1SM,2903
370
370
  nucliadb/writer/tus/utils.py,sha256=MSdVbRsRSZVdkaum69_0wku7X3p5wlZf4nr6E0GMKbw,2556
371
- nucliadb-6.4.2.post4374.dist-info/METADATA,sha256=--jiGRDysBjEUVtooZ1tFXSZUA4NVdV2wo_1HLrMInA,4152
372
- nucliadb-6.4.2.post4374.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
373
- nucliadb-6.4.2.post4374.dist-info/entry_points.txt,sha256=XqGfgFDuY3zXQc8ewXM2TRVjTModIq851zOsgrmaXx4,1268
374
- nucliadb-6.4.2.post4374.dist-info/top_level.txt,sha256=hwYhTVnX7jkQ9gJCkVrbqEG1M4lT2F_iPQND1fCzF80,20
375
- nucliadb-6.4.2.post4374.dist-info/RECORD,,
371
+ nucliadb-6.4.2.post4376.dist-info/METADATA,sha256=FWD9EeIPDvZWgRX4R33CaHbOrlk2YYzGCtrnMGaqR0s,4152
372
+ nucliadb-6.4.2.post4376.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
373
+ nucliadb-6.4.2.post4376.dist-info/entry_points.txt,sha256=XqGfgFDuY3zXQc8ewXM2TRVjTModIq851zOsgrmaXx4,1268
374
+ nucliadb-6.4.2.post4376.dist-info/top_level.txt,sha256=hwYhTVnX7jkQ9gJCkVrbqEG1M4lT2F_iPQND1fCzF80,20
375
+ nucliadb-6.4.2.post4376.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.8.0)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5