nucliadb-models 6.4.0.post4241__py3-none-any.whl → 6.4.0.post4271__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 +45 -1
- {nucliadb_models-6.4.0.post4241.dist-info → nucliadb_models-6.4.0.post4271.dist-info}/METADATA +1 -1
- {nucliadb_models-6.4.0.post4241.dist-info → nucliadb_models-6.4.0.post4271.dist-info}/RECORD +5 -5
- {nucliadb_models-6.4.0.post4241.dist-info → nucliadb_models-6.4.0.post4271.dist-info}/WHEEL +1 -1
- {nucliadb_models-6.4.0.post4241.dist-info → nucliadb_models-6.4.0.post4271.dist-info}/top_level.txt +0 -0
nucliadb_models/search.py
CHANGED
@@ -1003,6 +1003,21 @@ class RephraseModel(BaseModel):
|
|
1003
1003
|
title="Generative model",
|
1004
1004
|
description="The generative model to use for the rephrase endpoint. If not provided, the model configured for the Knowledge Box is used.", # noqa: E501
|
1005
1005
|
)
|
1006
|
+
chat_history_relevance_threshold: Optional[
|
1007
|
+
Annotated[
|
1008
|
+
float,
|
1009
|
+
Field(
|
1010
|
+
ge=0.0,
|
1011
|
+
le=1.0,
|
1012
|
+
description=(
|
1013
|
+
"Threshold to determine if the past chat history is relevant to rephrase the user's question. "
|
1014
|
+
"0 - Always treat previous messages as relevant (always rephrase)."
|
1015
|
+
"1 – Always treat previous messages as irrelevant (never rephrase)."
|
1016
|
+
"Values in between adjust the sensitivity."
|
1017
|
+
),
|
1018
|
+
),
|
1019
|
+
]
|
1020
|
+
] = None
|
1006
1021
|
|
1007
1022
|
|
1008
1023
|
class RagStrategyName:
|
@@ -1578,6 +1593,21 @@ If empty, the default strategy is used, which simply adds the text of the matchi
|
|
1578
1593
|
"Rephrase the query for a more efficient retrieval. This will consume LLM tokens and make the request slower."
|
1579
1594
|
),
|
1580
1595
|
)
|
1596
|
+
chat_history_relevance_threshold: Optional[
|
1597
|
+
Annotated[
|
1598
|
+
float,
|
1599
|
+
Field(
|
1600
|
+
ge=0.0,
|
1601
|
+
le=1.0,
|
1602
|
+
description=(
|
1603
|
+
"Threshold to determine if the past chat history is relevant to rephrase the user's question. "
|
1604
|
+
"0 - Always treat previous messages as relevant (always rephrase)."
|
1605
|
+
"1 – Always treat previous messages as irrelevant (never rephrase)."
|
1606
|
+
"Values in between adjust the sensitivity."
|
1607
|
+
),
|
1608
|
+
),
|
1609
|
+
]
|
1610
|
+
] = None
|
1581
1611
|
|
1582
1612
|
prefer_markdown: bool = Field(
|
1583
1613
|
default=False,
|
@@ -1905,6 +1935,15 @@ class KnowledgeboxFindResults(JsonBaseModel):
|
|
1905
1935
|
title="Best matches",
|
1906
1936
|
description="List of ids of best matching paragraphs. The list is sorted by decreasing relevance (most relevant first).", # noqa: E501
|
1907
1937
|
)
|
1938
|
+
metrics: Optional[dict[str, Any]] = Field(
|
1939
|
+
default=None,
|
1940
|
+
title="Metrics",
|
1941
|
+
description=(
|
1942
|
+
"Metrics information about the search operation. "
|
1943
|
+
"The metadata included in this field is subject to change and should not be used in production. "
|
1944
|
+
"This is only available if the `debug` parameter is set to true in the request."
|
1945
|
+
),
|
1946
|
+
)
|
1908
1947
|
|
1909
1948
|
|
1910
1949
|
class FeedbackTasks(str, Enum):
|
@@ -2077,7 +2116,11 @@ class SyncAskResponse(BaseModel):
|
|
2077
2116
|
debug: Optional[dict[str, Any]] = Field(
|
2078
2117
|
default=None,
|
2079
2118
|
title="Debug information",
|
2080
|
-
description=
|
2119
|
+
description=(
|
2120
|
+
"Debug information about the ask operation. "
|
2121
|
+
"The metadata included in this field is subject to change and should not be used in production. "
|
2122
|
+
"Note that it is only available if the `debug` parameter is set to true in the request."
|
2123
|
+
),
|
2081
2124
|
)
|
2082
2125
|
|
2083
2126
|
|
@@ -2137,6 +2180,7 @@ class RelationsAskResponseItem(BaseModel):
|
|
2137
2180
|
class DebugAskResponseItem(BaseModel):
|
2138
2181
|
type: Literal["debug"] = "debug"
|
2139
2182
|
metadata: dict[str, Any]
|
2183
|
+
metrics: dict[str, Any]
|
2140
2184
|
|
2141
2185
|
|
2142
2186
|
AskResponseItemType = Union[
|
{nucliadb_models-6.4.0.post4241.dist-info → nucliadb_models-6.4.0.post4271.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=Emf02fKF9cmOOZBXk4LYpJGkiMl4hkNSTUPAtS8j86A,85538
|
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.post4271.dist-info/METADATA,sha256=ULdypfYzDrgthxaONN6S3U3g0Tx-jKOlFGAEOHvTwnI,759
|
36
|
+
nucliadb_models-6.4.0.post4271.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
|
37
|
+
nucliadb_models-6.4.0.post4271.dist-info/top_level.txt,sha256=UrY1I8oeovIRwkXLYplssTrxQdUjhSEFDFbnwaIV3tA,16
|
38
|
+
nucliadb_models-6.4.0.post4271.dist-info/RECORD,,
|
{nucliadb_models-6.4.0.post4241.dist-info → nucliadb_models-6.4.0.post4271.dist-info}/top_level.txt
RENAMED
File without changes
|