nucliadb-models 6.4.0.post4196__py3-none-any.whl → 6.4.0.post4204__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/search.py +19 -0
- {nucliadb_models-6.4.0.post4196.dist-info → nucliadb_models-6.4.0.post4204.dist-info}/METADATA +1 -1
- {nucliadb_models-6.4.0.post4196.dist-info → nucliadb_models-6.4.0.post4204.dist-info}/RECORD +5 -5
- {nucliadb_models-6.4.0.post4196.dist-info → nucliadb_models-6.4.0.post4204.dist-info}/WHEEL +0 -0
- {nucliadb_models-6.4.0.post4196.dist-info → nucliadb_models-6.4.0.post4204.dist-info}/top_level.txt +0 -0
nucliadb_models/search.py
CHANGED
@@ -607,6 +607,12 @@ class SearchParamDefaults:
|
|
607
607
|
description="Vectors index to perform the search in. If not provided, NucliaDB will use the default one",
|
608
608
|
)
|
609
609
|
chat_context = ParamDefault(
|
610
|
+
default=None,
|
611
|
+
title="Chat history",
|
612
|
+
description="DEPRECATED! Please, use `chat_history` instead.",
|
613
|
+
deprecated=True,
|
614
|
+
)
|
615
|
+
chat_history = ParamDefault(
|
610
616
|
default=None,
|
611
617
|
title="Chat history",
|
612
618
|
description="Use to rephrase the new LLM query by taking into account the chat conversation history", # noqa: E501
|
@@ -1454,6 +1460,9 @@ class AskRequest(AuditMetadataBase):
|
|
1454
1460
|
field_type_filter: list[FieldTypeName] = SearchParamDefaults.field_type_filter.to_pydantic_field()
|
1455
1461
|
extracted: list[ExtractedDataTypeName] = SearchParamDefaults.extracted.to_pydantic_field()
|
1456
1462
|
context: Optional[list[ChatContextMessage]] = SearchParamDefaults.chat_context.to_pydantic_field()
|
1463
|
+
chat_history: Optional[list[ChatContextMessage]] = (
|
1464
|
+
SearchParamDefaults.chat_history.to_pydantic_field()
|
1465
|
+
)
|
1457
1466
|
extra_context: Optional[list[str]] = Field(
|
1458
1467
|
default=None,
|
1459
1468
|
title="Extra query context",
|
@@ -1641,6 +1650,16 @@ Using this feature also disables the `citations` parameter. For maximal accuracy
|
|
1641
1650
|
values["rank_fusion"] = RankFusionName.RECIPROCAL_RANK_FUSION
|
1642
1651
|
return values
|
1643
1652
|
|
1653
|
+
@model_validator(mode="after")
|
1654
|
+
def rename_context_to_chat_history(self) -> Self:
|
1655
|
+
"""Bw/c rename from `context` to `chat_history`"""
|
1656
|
+
if self.context is not None and self.chat_history is not None:
|
1657
|
+
raise ValueError("`context` and `chat_history` are the same, please, use the latter")
|
1658
|
+
elif self.context is not None:
|
1659
|
+
self.chat_history = self.context
|
1660
|
+
self.context = None
|
1661
|
+
return self
|
1662
|
+
|
1644
1663
|
|
1645
1664
|
# Alias (for backwards compatiblity with testbed)
|
1646
1665
|
class ChatRequest(AskRequest):
|
{nucliadb_models-6.4.0.post4196.dist-info → nucliadb_models-6.4.0.post4204.dist-info}/RECORD
RENAMED
@@ -16,7 +16,7 @@ nucliadb_models/notifications.py,sha256=jr2J3zncs880jYf2oZHYt0VFcnlZevsbkyX69ovT
|
|
16
16
|
nucliadb_models/processing.py,sha256=UeU-VxbBlOzkNxviOS3a0X_k7Ye-jYu3UOdGuu21M8M,971
|
17
17
|
nucliadb_models/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
18
18
|
nucliadb_models/resource.py,sha256=cjYloaRuCJFc3lGIxLZcX959oOq_N1f3V9bpPMYv4WA,9255
|
19
|
-
nucliadb_models/search.py,sha256=
|
19
|
+
nucliadb_models/search.py,sha256=AviTtBGQZ-zAKYbD-rprzX7yfIjsIh09IW4sDbC9FnU,83666
|
20
20
|
nucliadb_models/security.py,sha256=RewdzQ55nPZ9V7B0NX9KHeWg6B4Hg_RkeiFv2TQyrjs,1402
|
21
21
|
nucliadb_models/synonyms.py,sha256=qXTPHfspMgw22hCjAOdFOIoUsRZ7Ju3JW-Lw9Nz4VaI,942
|
22
22
|
nucliadb_models/text.py,sha256=dr-ckEIK0a8c5u-7uO1wpund_8KKb_4T79Au4Lfv-Bo,3150
|
@@ -32,7 +32,7 @@ nucliadb_models/graph/responses.py,sha256=3aimAHrd3YW1BXHU_ZXRoidlccRtkCcREkfCNo
|
|
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=bcnkxF_zViHZfT6WTAMBcWgY3UV-OAV65cVdSqGkcHY,1943
|
35
|
-
nucliadb_models-6.4.0.
|
36
|
-
nucliadb_models-6.4.0.
|
37
|
-
nucliadb_models-6.4.0.
|
38
|
-
nucliadb_models-6.4.0.
|
35
|
+
nucliadb_models-6.4.0.post4204.dist-info/METADATA,sha256=3SeKv4L2FhQ5yfSniM7f-lcChsUEqtjJbyOgMulh0Zo,759
|
36
|
+
nucliadb_models-6.4.0.post4204.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
|
37
|
+
nucliadb_models-6.4.0.post4204.dist-info/top_level.txt,sha256=UrY1I8oeovIRwkXLYplssTrxQdUjhSEFDFbnwaIV3tA,16
|
38
|
+
nucliadb_models-6.4.0.post4204.dist-info/RECORD,,
|
File without changes
|
{nucliadb_models-6.4.0.post4196.dist-info → nucliadb_models-6.4.0.post4204.dist-info}/top_level.txt
RENAMED
File without changes
|