nucliadb-models 6.3.7.post4081__py3-none-any.whl → 6.3.7.post4114__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 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[SearchOptions] = SearchParamDefaults.search_features.to_pydantic_field(
1727
+ features: list[FindOptions] = SearchParamDefaults.search_features.to_pydantic_field(
1722
1728
  default=[
1723
- SearchOptions.KEYWORD,
1724
- SearchOptions.SEMANTIC,
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):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nucliadb_models
3
- Version: 6.3.7.post4081
3
+ Version: 6.3.7.post4114
4
4
  Author-email: Nuclia <nucliadb@nuclia.com>
5
5
  License: AGPL
6
6
  Project-URL: Homepage, https://nuclia.com
@@ -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=W3L7MYMO63BW7saQD95SvuB6uDJ5OwcnRwS2TzS0FAc,82299
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.post4081.dist-info/METADATA,sha256=o25Lp4WyeLbFQOCQDX-9xxbLRQLPJL-mq91XEIiXRYg,759
36
- nucliadb_models-6.3.7.post4081.dist-info/WHEEL,sha256=pxyMxgL8-pra_rKaQ4drOZAegBVuX-G_4nRHjjgWbmo,91
37
- nucliadb_models-6.3.7.post4081.dist-info/top_level.txt,sha256=UrY1I8oeovIRwkXLYplssTrxQdUjhSEFDFbnwaIV3tA,16
38
- nucliadb_models-6.3.7.post4081.dist-info/RECORD,,
35
+ nucliadb_models-6.3.7.post4114.dist-info/METADATA,sha256=e_tROn4802NLL3cyLfYdZ_kQTwuEzZ3Wsmv973Djcuk,759
36
+ nucliadb_models-6.3.7.post4114.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
37
+ nucliadb_models-6.3.7.post4114.dist-info/top_level.txt,sha256=UrY1I8oeovIRwkXLYplssTrxQdUjhSEFDFbnwaIV3tA,16
38
+ nucliadb_models-6.3.7.post4114.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (79.0.0)
2
+ Generator: setuptools (79.0.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5