nucliadb-models 6.9.2.post5264__py3-none-any.whl → 6.9.2.post5275__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.

Potentially problematic release.


This version of nucliadb-models might be problematic. Click here for more details.

nucliadb_models/search.py CHANGED
@@ -79,8 +79,9 @@ ANSWER_JSON_SCHEMA_EXAMPLE = {
79
79
  class ModelParamDefaults:
80
80
  applied_autofilters = ParamDefault(
81
81
  default=[],
82
- title="Autofilters",
83
- description="List of filters automatically applied to the search query",
82
+ title="Applied autofilters",
83
+ description="[deprecated] list of filters automatically applied to the search query",
84
+ deprecated=True,
84
85
  )
85
86
 
86
87
 
@@ -296,6 +297,8 @@ class KnowledgeboxSearchResults(JsonBaseModel):
296
297
  relations: Optional[Relations] = None
297
298
  nodes: Optional[list[dict[str, str]]] = None
298
299
  shards: Optional[list[str]] = None
300
+
301
+ # TODO: remove on a future major release
299
302
  autofilters: list[str] = ModelParamDefaults.applied_autofilters.to_pydantic_field()
300
303
 
301
304
 
@@ -481,12 +484,6 @@ class SearchParamDefaults:
481
484
  description="The list of facets to calculate. The facets follow the same syntax as filters: https://docs.nuclia.dev/docs/rag/advanced/search-filters", # noqa: E501
482
485
  max_items=50,
483
486
  )
484
- autofilter = ParamDefault(
485
- default=False,
486
- title="Automatic search filtering",
487
- description="[Deprecated] If set to true, the search will automatically add filters to the query. For example, it will filter results containing the entities detected in the query", # noqa: E501
488
- deprecated=True,
489
- )
490
487
  chat_query = ParamDefault(
491
488
  default=...,
492
489
  title="Query",
@@ -877,7 +874,9 @@ class BaseSearchRequest(AuditMetadataBase):
877
874
  vectorset: Optional[str] = SearchParamDefaults.vectorset.to_pydantic_field()
878
875
  with_duplicates: bool = SearchParamDefaults.with_duplicates.to_pydantic_field()
879
876
  with_synonyms: bool = SearchParamDefaults.with_synonyms.to_pydantic_field()
880
- autofilter: bool = SearchParamDefaults.autofilter.to_pydantic_field()
877
+ # autofilter is deprecated and its logic was removed. We're just keeping it in the model definition to
878
+ # avoid breaking changes in the python sdks. Please remove on a future major release.
879
+ autofilter: SkipJsonSchema[bool] = False
881
880
  resource_filters: list[str] = SearchParamDefaults.resource_filters.to_pydantic_field()
882
881
  security: Optional[RequestSecurity] = SearchParamDefaults.security.to_pydantic_field()
883
882
  show_hidden: bool = SearchParamDefaults.show_hidden.to_pydantic_field()
@@ -1620,7 +1619,11 @@ class AskRequest(AuditMetadataBase):
1620
1619
  description="Image that will be used together with the query text for retrieval and then sent to the LLM as part of the context. "
1621
1620
  "If a query image is provided, the `extra_context_images` and `rag_images_strategies` will be disabled.",
1622
1621
  )
1623
- autofilter: bool = SearchParamDefaults.autofilter.to_pydantic_field()
1622
+
1623
+ # autofilter is deprecated and its logic was removed. We're just keeping it in the model definition to
1624
+ # avoid breaking changes in the python sdks. Please remove on a future major release.
1625
+ autofilter: SkipJsonSchema[bool] = False
1626
+
1624
1627
  highlight: bool = SearchParamDefaults.highlight.to_pydantic_field()
1625
1628
  resource_filters: list[str] = SearchParamDefaults.resource_filters.to_pydantic_field()
1626
1629
  prompt: Optional[Union[str, CustomPrompt]] = Field(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nucliadb_models
3
- Version: 6.9.2.post5264
3
+ Version: 6.9.2.post5275
4
4
  Author-email: Nuclia <nucliadb@nuclia.com>
5
5
  License-Expression: Apache-2.0
6
6
  Project-URL: Homepage, https://nuclia.com
@@ -17,7 +17,7 @@ nucliadb_models/notifications.py,sha256=mna8-AoD_29Wds0Thl0AF0zpERnJmYGLZX1w1fUo
17
17
  nucliadb_models/processing.py,sha256=nhKuHQjqCdb9zJVkYGPTLub23tK9e_lwL5OCDVymZjY,719
18
18
  nucliadb_models/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
19
  nucliadb_models/resource.py,sha256=RzCos0QRgSMkaV-p7EoceSmt7UTzt9G9be5BKF-iGrQ,9021
20
- nucliadb_models/search.py,sha256=tUedQpOY1OKnhCybnU-0dae3f6QjoN3rDVhwgDgLj5Y,96008
20
+ nucliadb_models/search.py,sha256=95ZvFFZPtxOLSKMXp-_EK5Tcrs0voB8L8P72H5AiP0g,96105
21
21
  nucliadb_models/security.py,sha256=opxaDLfvk3aU0sjesK0jGrYLx5h4YCwlKKN0moYs_ig,1150
22
22
  nucliadb_models/synonyms.py,sha256=afbaVqSQSxGLwi2PusVaLSRpkOtA5AZmWOKd1f4nl2E,690
23
23
  nucliadb_models/text.py,sha256=60bxZnOjRHnDdezR8VfR3AZsXTOwePFPs2BKB8wxBak,3414
@@ -33,7 +33,7 @@ nucliadb_models/graph/responses.py,sha256=Sdq8OgFAL1YT-1lJyLLrkqcScvj7YTEqAUwQ-k
33
33
  nucliadb_models/internal/__init__.py,sha256=zG33bUz1rHFPtvqQPWn4rDwBJt3FJodGuQYD45quiQg,583
34
34
  nucliadb_models/internal/predict.py,sha256=Pnx6MmLfK65eExe1XnVxqmSlvMwdowewwks9BOEoqMw,2029
35
35
  nucliadb_models/internal/shards.py,sha256=__y1OZtWGiNcPQEWfSFOj8yw458WGi7mM4vZe0K-L1Y,1691
36
- nucliadb_models-6.9.2.post5264.dist-info/METADATA,sha256=aBDsPQemmUthQ8Qtj5Bb4fFqK__CGokAGLFWWW8zVbk,745
37
- nucliadb_models-6.9.2.post5264.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
38
- nucliadb_models-6.9.2.post5264.dist-info/top_level.txt,sha256=UrY1I8oeovIRwkXLYplssTrxQdUjhSEFDFbnwaIV3tA,16
39
- nucliadb_models-6.9.2.post5264.dist-info/RECORD,,
36
+ nucliadb_models-6.9.2.post5275.dist-info/METADATA,sha256=nCnsWEzCf8RJ5NU1BqsEnG9ofexTIudTrTshw453nGU,745
37
+ nucliadb_models-6.9.2.post5275.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
38
+ nucliadb_models-6.9.2.post5275.dist-info/top_level.txt,sha256=UrY1I8oeovIRwkXLYplssTrxQdUjhSEFDFbnwaIV3tA,16
39
+ nucliadb_models-6.9.2.post5275.dist-info/RECORD,,