nucliadb 6.7.0.post4806__py3-none-any.whl → 6.7.0.post4811__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/writer/api/v1/field.py +9 -4
- {nucliadb-6.7.0.post4806.dist-info → nucliadb-6.7.0.post4811.dist-info}/METADATA +6 -6
- {nucliadb-6.7.0.post4806.dist-info → nucliadb-6.7.0.post4811.dist-info}/RECORD +6 -6
- {nucliadb-6.7.0.post4806.dist-info → nucliadb-6.7.0.post4811.dist-info}/WHEEL +0 -0
- {nucliadb-6.7.0.post4806.dist-info → nucliadb-6.7.0.post4811.dist-info}/entry_points.txt +0 -0
- {nucliadb-6.7.0.post4806.dist-info → nucliadb-6.7.0.post4811.dist-info}/top_level.txt +0 -0
nucliadb/writer/api/v1/field.py
CHANGED
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
from inspect import iscoroutinefunction
|
|
21
21
|
from typing import TYPE_CHECKING, Annotated, Callable, Optional, Type, Union
|
|
22
22
|
|
|
23
|
+
import pydantic
|
|
23
24
|
from fastapi import HTTPException, Query, Response
|
|
24
25
|
from fastapi_versioning import version
|
|
25
26
|
from starlette.requests import Request
|
|
@@ -461,8 +462,10 @@ async def append_messages_to_conversation_field_rslug_prefix(
|
|
|
461
462
|
field_id: FieldIdString,
|
|
462
463
|
messages: list[models.InputMessage],
|
|
463
464
|
) -> ResourceFieldAdded:
|
|
464
|
-
|
|
465
|
-
|
|
465
|
+
try:
|
|
466
|
+
field = models.InputConversationField(messages=messages)
|
|
467
|
+
except pydantic.ValidationError as e:
|
|
468
|
+
raise HTTPException(status_code=422, detail=str(e))
|
|
466
469
|
return await add_field_to_resource_by_slug(request, kbid, rslug, field_id, field)
|
|
467
470
|
|
|
468
471
|
|
|
@@ -482,8 +485,10 @@ async def append_messages_to_conversation_field_rid_prefix(
|
|
|
482
485
|
field_id: FieldIdString,
|
|
483
486
|
messages: list[models.InputMessage],
|
|
484
487
|
) -> ResourceFieldAdded:
|
|
485
|
-
|
|
486
|
-
|
|
488
|
+
try:
|
|
489
|
+
field = models.InputConversationField(messages=messages)
|
|
490
|
+
except pydantic.ValidationError as e:
|
|
491
|
+
raise HTTPException(status_code=422, detail=str(e))
|
|
487
492
|
return await add_field_to_resource(request, kbid, rid, field_id, field)
|
|
488
493
|
|
|
489
494
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nucliadb
|
|
3
|
-
Version: 6.7.0.
|
|
3
|
+
Version: 6.7.0.post4811
|
|
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.7.0.
|
|
23
|
-
Requires-Dist: nucliadb-utils[cache,fastapi,storages]>=6.7.0.
|
|
24
|
-
Requires-Dist: nucliadb-protos>=6.7.0.
|
|
25
|
-
Requires-Dist: nucliadb-models>=6.7.0.
|
|
26
|
-
Requires-Dist: nidx-protos>=6.7.0.
|
|
22
|
+
Requires-Dist: nucliadb-telemetry[all]>=6.7.0.post4811
|
|
23
|
+
Requires-Dist: nucliadb-utils[cache,fastapi,storages]>=6.7.0.post4811
|
|
24
|
+
Requires-Dist: nucliadb-protos>=6.7.0.post4811
|
|
25
|
+
Requires-Dist: nucliadb-models>=6.7.0.post4811
|
|
26
|
+
Requires-Dist: nidx-protos>=6.7.0.post4811
|
|
27
27
|
Requires-Dist: nucliadb-admin-assets>=1.0.0.post1224
|
|
28
28
|
Requires-Dist: nuclia-models>=0.46.0
|
|
29
29
|
Requires-Dist: uvicorn[standard]
|
|
@@ -352,7 +352,7 @@ nucliadb/writer/api/constants.py,sha256=SCdqGDbEmpdczQdTfbTlpHzVjbLqccPtMQ25MPIF
|
|
|
352
352
|
nucliadb/writer/api/utils.py,sha256=wIQHlU8RQiIGVLI72suvyVIKlCU44Unh0Ae0IiN6Qwo,1313
|
|
353
353
|
nucliadb/writer/api/v1/__init__.py,sha256=akI9A_jloNLb0dU4T5zjfdyvmSAiDeIdjAlzNx74FlU,1128
|
|
354
354
|
nucliadb/writer/api/v1/export_import.py,sha256=v0sU55TtRSqDzwkDgcwv2uSaqKCuQTtGcMpYoHQYBQA,8192
|
|
355
|
-
nucliadb/writer/api/v1/field.py,sha256=
|
|
355
|
+
nucliadb/writer/api/v1/field.py,sha256=VmGjM9kCgkpaYDGj6heOPiUeY2HsxgBTFHKfmjYEypM,18963
|
|
356
356
|
nucliadb/writer/api/v1/knowledgebox.py,sha256=PHEYDFa-sN5JrI8-EiVVg5FDOsRuCLT43kyAB4xt-xA,9530
|
|
357
357
|
nucliadb/writer/api/v1/learning_config.py,sha256=mGQmnfFSM2Z9HDnWr8PFoA1MLpFR1JaCDb8B14J8e5k,4140
|
|
358
358
|
nucliadb/writer/api/v1/resource.py,sha256=gr4VtYOtnIAL5zsDQsBDzeOOWWh6wN7PUh1XgUsQ9N4,20436
|
|
@@ -376,8 +376,8 @@ nucliadb/writer/tus/local.py,sha256=7jYa_w9b-N90jWgN2sQKkNcomqn6JMVBOVeDOVYJHto,
|
|
|
376
376
|
nucliadb/writer/tus/s3.py,sha256=vu1BGg4VqJ_x2P1u2BxqPKlSfw5orT_a3R-Ln5oPUpU,8483
|
|
377
377
|
nucliadb/writer/tus/storage.py,sha256=ToqwjoYnjI4oIcwzkhha_MPxi-k4Jk3Lt55zRwaC1SM,2903
|
|
378
378
|
nucliadb/writer/tus/utils.py,sha256=MSdVbRsRSZVdkaum69_0wku7X3p5wlZf4nr6E0GMKbw,2556
|
|
379
|
-
nucliadb-6.7.0.
|
|
380
|
-
nucliadb-6.7.0.
|
|
381
|
-
nucliadb-6.7.0.
|
|
382
|
-
nucliadb-6.7.0.
|
|
383
|
-
nucliadb-6.7.0.
|
|
379
|
+
nucliadb-6.7.0.post4811.dist-info/METADATA,sha256=p3Smyp2pR5F68emgb6Cq57vc06p37MalAyHk4g0epZ4,4158
|
|
380
|
+
nucliadb-6.7.0.post4811.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
381
|
+
nucliadb-6.7.0.post4811.dist-info/entry_points.txt,sha256=XqGfgFDuY3zXQc8ewXM2TRVjTModIq851zOsgrmaXx4,1268
|
|
382
|
+
nucliadb-6.7.0.post4811.dist-info/top_level.txt,sha256=hwYhTVnX7jkQ9gJCkVrbqEG1M4lT2F_iPQND1fCzF80,20
|
|
383
|
+
nucliadb-6.7.0.post4811.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|