nucliadb-models 6.7.0.post4773__py3-none-any.whl → 6.7.0.post4800__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
@@ -809,6 +809,11 @@ class MinScore(BaseModel):
809
809
  )
810
810
 
811
811
 
812
+ class Image(BaseModel):
813
+ content_type: str
814
+ b64encoded: str
815
+
816
+
812
817
  AUDIT_METADATA_MAX_BYTES = 1024 * 10 # 10KB
813
818
 
814
819
 
@@ -902,6 +907,11 @@ Please return ONLY the question without any explanation. Just the rephrased ques
902
907
  Please return ONLY the question without any explanation.""",
903
908
  ],
904
909
  )
910
+ query_image: Optional[Image] = Field(
911
+ default=None,
912
+ title="Query image",
913
+ description="Image that will be used together with the query text for retrieval.",
914
+ )
905
915
 
906
916
  @model_validator(mode="before")
907
917
  @classmethod
@@ -953,11 +963,6 @@ class UserPrompt(BaseModel):
953
963
  prompt: str
954
964
 
955
965
 
956
- class Image(BaseModel):
957
- content_type: str
958
- b64encoded: str
959
-
960
-
961
966
  class MaxTokens(BaseModel):
962
967
  context: Optional[int] = Field(
963
968
  default=None,
@@ -1565,6 +1570,12 @@ class AskRequest(AuditMetadataBase):
1565
1570
  description="""Additional images added to the retrieval context sent to the LLM."
1566
1571
  It allows extending the chat feature with content that may not be in the Knowledge Box.""",
1567
1572
  )
1573
+ query_image: Optional[Image] = Field(
1574
+ default=None,
1575
+ title="Query image",
1576
+ description="Image that will be used together with the query text for retrieval and then sent to the LLM as part of the context. "
1577
+ "If a query image is provided, the `extra_context_images` and `rag_images_strategies` will be disabled.",
1578
+ )
1568
1579
  autofilter: bool = SearchParamDefaults.autofilter.to_pydantic_field()
1569
1580
  highlight: bool = SearchParamDefaults.highlight.to_pydantic_field()
1570
1581
  resource_filters: list[str] = SearchParamDefaults.resource_filters.to_pydantic_field()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nucliadb_models
3
- Version: 6.7.0.post4773
3
+ Version: 6.7.0.post4800
4
4
  Author-email: Nuclia <nucliadb@nuclia.com>
5
5
  License-Expression: Apache-2.0
6
6
  Project-URL: Homepage, https://nuclia.com
@@ -16,7 +16,7 @@ nucliadb_models/notifications.py,sha256=mna8-AoD_29Wds0Thl0AF0zpERnJmYGLZX1w1fUo
16
16
  nucliadb_models/processing.py,sha256=nhKuHQjqCdb9zJVkYGPTLub23tK9e_lwL5OCDVymZjY,719
17
17
  nucliadb_models/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
18
  nucliadb_models/resource.py,sha256=RzCos0QRgSMkaV-p7EoceSmt7UTzt9G9be5BKF-iGrQ,9021
19
- nucliadb_models/search.py,sha256=UtENf6-osZ6TvV7EzqrBN67GfZtrBhCZEo3qBi15ejs,91648
19
+ nucliadb_models/search.py,sha256=2pmXfnVkmWqs0WAlJC0XlMk3sqnhlpJx1AbtTQ_BjN8,92190
20
20
  nucliadb_models/security.py,sha256=opxaDLfvk3aU0sjesK0jGrYLx5h4YCwlKKN0moYs_ig,1150
21
21
  nucliadb_models/synonyms.py,sha256=afbaVqSQSxGLwi2PusVaLSRpkOtA5AZmWOKd1f4nl2E,690
22
22
  nucliadb_models/text.py,sha256=60bxZnOjRHnDdezR8VfR3AZsXTOwePFPs2BKB8wxBak,3414
@@ -32,7 +32,7 @@ nucliadb_models/graph/responses.py,sha256=Sdq8OgFAL1YT-1lJyLLrkqcScvj7YTEqAUwQ-k
32
32
  nucliadb_models/internal/__init__.py,sha256=zG33bUz1rHFPtvqQPWn4rDwBJt3FJodGuQYD45quiQg,583
33
33
  nucliadb_models/internal/predict.py,sha256=Pnx6MmLfK65eExe1XnVxqmSlvMwdowewwks9BOEoqMw,2029
34
34
  nucliadb_models/internal/shards.py,sha256=__y1OZtWGiNcPQEWfSFOj8yw458WGi7mM4vZe0K-L1Y,1691
35
- nucliadb_models-6.7.0.post4773.dist-info/METADATA,sha256=aZgidiqyHnWxQ_se8I1zfgER1DUthR9RXdDWzrqMrGk,794
36
- nucliadb_models-6.7.0.post4773.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
37
- nucliadb_models-6.7.0.post4773.dist-info/top_level.txt,sha256=UrY1I8oeovIRwkXLYplssTrxQdUjhSEFDFbnwaIV3tA,16
38
- nucliadb_models-6.7.0.post4773.dist-info/RECORD,,
35
+ nucliadb_models-6.7.0.post4800.dist-info/METADATA,sha256=z6AklqRSZ7kswuCcVG3hEdoGdT67Mw-zqqlvCGYSFGA,794
36
+ nucliadb_models-6.7.0.post4800.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
37
+ nucliadb_models-6.7.0.post4800.dist-info/top_level.txt,sha256=UrY1I8oeovIRwkXLYplssTrxQdUjhSEFDFbnwaIV3tA,16
38
+ nucliadb_models-6.7.0.post4800.dist-info/RECORD,,