nucliadb-models 6.3.7.post4091__py3-none-any.whl → 6.3.7.post4116__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 +16 -18
- {nucliadb_models-6.3.7.post4091.dist-info → nucliadb_models-6.3.7.post4116.dist-info}/METADATA +1 -1
- {nucliadb_models-6.3.7.post4091.dist-info → nucliadb_models-6.3.7.post4116.dist-info}/RECORD +5 -5
- {nucliadb_models-6.3.7.post4091.dist-info → nucliadb_models-6.3.7.post4116.dist-info}/WHEEL +1 -1
- {nucliadb_models-6.3.7.post4091.dist-info → nucliadb_models-6.3.7.post4116.dist-info}/top_level.txt +0 -0
nucliadb_models/search.py
CHANGED
@@ -103,6 +103,12 @@ class SearchOptions(str, Enum):
|
|
103
103
|
SEMANTIC = "semantic"
|
104
104
|
|
105
105
|
|
106
|
+
class FindOptions(str, Enum):
|
107
|
+
RELATIONS = "relations"
|
108
|
+
KEYWORD = "keyword"
|
109
|
+
SEMANTIC = "semantic"
|
110
|
+
|
111
|
+
|
106
112
|
class ChatOptions(str, Enum):
|
107
113
|
KEYWORD = "keyword"
|
108
114
|
RELATIONS = "relations"
|
@@ -789,13 +795,6 @@ class BaseSearchRequest(AuditMetadataBase):
|
|
789
795
|
range_modification_end: Optional[DateTime] = (
|
790
796
|
SearchParamDefaults.range_modification_end.to_pydantic_field()
|
791
797
|
)
|
792
|
-
features: list[SearchOptions] = SearchParamDefaults.search_features.to_pydantic_field(
|
793
|
-
default=[
|
794
|
-
SearchOptions.KEYWORD,
|
795
|
-
SearchOptions.FULLTEXT,
|
796
|
-
SearchOptions.SEMANTIC,
|
797
|
-
]
|
798
|
-
)
|
799
798
|
debug: bool = SearchParamDefaults.debug.to_pydantic_field()
|
800
799
|
highlight: bool = SearchParamDefaults.highlight.to_pydantic_field()
|
801
800
|
show: list[ResourceProperties] = SearchParamDefaults.show.to_pydantic_field()
|
@@ -853,6 +852,13 @@ Please return ONLY the question without any explanation. Just the rephrased ques
|
|
853
852
|
|
854
853
|
|
855
854
|
class SearchRequest(BaseSearchRequest):
|
855
|
+
features: list[SearchOptions] = SearchParamDefaults.search_features.to_pydantic_field(
|
856
|
+
default=[
|
857
|
+
SearchOptions.KEYWORD,
|
858
|
+
SearchOptions.FULLTEXT,
|
859
|
+
SearchOptions.SEMANTIC,
|
860
|
+
]
|
861
|
+
)
|
856
862
|
faceted: list[str] = SearchParamDefaults.faceted.to_pydantic_field()
|
857
863
|
sort: Optional[SortOptions] = SearchParamDefaults.sort.to_pydantic_field()
|
858
864
|
|
@@ -1718,10 +1724,10 @@ class FindRequest(BaseSearchRequest):
|
|
1718
1724
|
query_entities: SkipJsonSchema[Optional[list[KnowledgeGraphEntity]]] = Field(
|
1719
1725
|
default=None, title="Query entities", description="Entities to use in a knowledge graph search"
|
1720
1726
|
)
|
1721
|
-
features: list[
|
1727
|
+
features: list[FindOptions] = SearchParamDefaults.search_features.to_pydantic_field(
|
1722
1728
|
default=[
|
1723
|
-
|
1724
|
-
|
1729
|
+
FindOptions.KEYWORD,
|
1730
|
+
FindOptions.SEMANTIC,
|
1725
1731
|
]
|
1726
1732
|
)
|
1727
1733
|
rank_fusion: Union[RankFusionName, RankFusion] = SearchParamDefaults.rank_fusion.to_pydantic_field()
|
@@ -1752,14 +1758,6 @@ class FindRequest(BaseSearchRequest):
|
|
1752
1758
|
description="The generative model used to rephrase the query. If not provided, the model configured for the Knowledge Box is used.",
|
1753
1759
|
)
|
1754
1760
|
|
1755
|
-
@field_validator("features", mode="after")
|
1756
|
-
@classmethod
|
1757
|
-
def fulltext_not_supported(cls, v):
|
1758
|
-
# features are already normalized in the BaseSearchRequest model
|
1759
|
-
if SearchOptions.FULLTEXT in v or SearchOptions.FULLTEXT == v:
|
1760
|
-
raise ValueError("fulltext search not supported")
|
1761
|
-
return v
|
1762
|
-
|
1763
1761
|
@model_validator(mode="before")
|
1764
1762
|
@classmethod
|
1765
1763
|
def fix_legacy_rank_fusion(cls, values):
|
{nucliadb_models-6.3.7.post4091.dist-info → nucliadb_models-6.3.7.post4116.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=HfXBMzRlRBKeFWmzsA4pWQmtR3Pt-EGLdp-rySqwWN8,82075
|
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=uZLsMkYWrJDHq3xy_w7snSeV2X3aDBuht9GC_MG3sKc,1976
|
35
|
-
nucliadb_models-6.3.7.
|
36
|
-
nucliadb_models-6.3.7.
|
37
|
-
nucliadb_models-6.3.7.
|
38
|
-
nucliadb_models-6.3.7.
|
35
|
+
nucliadb_models-6.3.7.post4116.dist-info/METADATA,sha256=mg2MajSP_t1rpR09iq0xRCvXNO3VQR0wZdA49lG9XT8,759
|
36
|
+
nucliadb_models-6.3.7.post4116.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
|
37
|
+
nucliadb_models-6.3.7.post4116.dist-info/top_level.txt,sha256=UrY1I8oeovIRwkXLYplssTrxQdUjhSEFDFbnwaIV3tA,16
|
38
|
+
nucliadb_models-6.3.7.post4116.dist-info/RECORD,,
|
{nucliadb_models-6.3.7.post4091.dist-info → nucliadb_models-6.3.7.post4116.dist-info}/top_level.txt
RENAMED
File without changes
|