nucliadb-models 6.9.0.post5086__py3-none-any.whl → 6.9.0.post5100__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.

@@ -22,32 +22,18 @@ from pydantic import BaseModel
22
22
  class ExternalIndexProviderType(str, Enum):
23
23
  """
24
24
  Enum for the different external index providers.
25
- For now only Pinecone is supported, but we may add more in the future.
25
+ For now none are supported, but we may add some in the future.
26
26
  """
27
27
 
28
- PINECONE = "pinecone"
28
+ UNSET = "unset"
29
29
 
30
30
 
31
31
  class ExternalIndexProviderBase(BaseModel):
32
32
  type: ExternalIndexProviderType
33
33
 
34
34
 
35
- class PineconeServerlessCloud(str, Enum):
36
- """
37
- List of cloud providers supported by Pinecone serverless vector database.
38
- """
39
-
40
- AWS_US_EAST_1 = "aws_us_east_1"
41
- AWS_US_WEST_2 = "aws_us_west_2"
42
- AWS_EU_WEST_1 = "aws_eu_west_1"
43
- GCP_US_CENTRAL1 = "gcp_us_central1"
44
- AZURE_EASTUS2 = "azure_eastus2"
45
-
46
-
47
- class PineconeIndexProvider(ExternalIndexProviderBase):
48
- type: ExternalIndexProviderType = ExternalIndexProviderType.PINECONE
49
- api_key: str
50
- serverless_cloud: PineconeServerlessCloud
35
+ class DummyIndexProvider(ExternalIndexProviderBase):
36
+ type: ExternalIndexProviderType = ExternalIndexProviderType.UNSET
51
37
 
52
38
 
53
- ExternalIndexProvider = Union[PineconeIndexProvider,]
39
+ ExternalIndexProvider = Union[DummyIndexProvider,]
@@ -17,7 +17,7 @@ from datetime import datetime
17
17
  from enum import Enum
18
18
  from typing import Any, Dict, List, Optional
19
19
 
20
- from pydantic import BaseModel, Field, model_validator
20
+ from pydantic import BaseModel, Field, field_validator, model_validator
21
21
  from typing_extensions import Self
22
22
 
23
23
  from nucliadb_models.utils import DateTime
@@ -231,15 +231,24 @@ class InputOrigin(BaseModel):
231
231
  default=[],
232
232
  title="Tags",
233
233
  description="Resource tags about the origin system. It can later be used for filtering on search endpoints with '/origin.tags/{tag}'",
234
+ max_length=300,
234
235
  )
235
- collaborators: List[str] = []
236
+ collaborators: List[str] = Field(default=[], max_length=100)
236
237
  filename: Optional[str] = None
237
- related: List[str] = []
238
+ related: List[str] = Field(default=[], max_length=100)
238
239
  path: Optional[str] = Field(
239
240
  default=None,
240
241
  description="Path of the original resource. Typically used to store folder structure information of the resource at the origin system. It can be later used for filtering on search endpoints with '/origin.path/{path}'",
242
+ max_length=2048,
241
243
  )
242
244
 
245
+ @field_validator("tags")
246
+ def validate_tag_length(cls, tags):
247
+ for tag in tags:
248
+ if len(tag) > 512:
249
+ raise ValueError("Each tag must be at most 1024 characters long")
250
+ return tags
251
+
243
252
 
244
253
  class Origin(InputOrigin):
245
254
  # Created and modified are redefined to
@@ -247,6 +256,12 @@ class Origin(InputOrigin):
247
256
  created: Optional[datetime] = None
248
257
  modified: Optional[datetime] = None
249
258
 
259
+ tags: List[str] = Field(
260
+ default=[],
261
+ title="Tags",
262
+ description="Resource tags about the origin system. It can later be used for filtering on search endpoints with '/origin.tags/{tag}'",
263
+ )
264
+
250
265
  class Source(Enum):
251
266
  WEB = "WEB"
252
267
  DESKTOP = "DESKTOP"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nucliadb_models
3
- Version: 6.9.0.post5086
3
+ Version: 6.9.0.post5100
4
4
  Author-email: Nuclia <nucliadb@nuclia.com>
5
5
  License-Expression: Apache-2.0
6
6
  Project-URL: Homepage, https://nuclia.com
@@ -5,14 +5,14 @@ nucliadb_models/content_types.py,sha256=36Ga-iGf4ivCqgtXC7imFgegrwHB117s9eqP62Jt
5
5
  nucliadb_models/conversation.py,sha256=t1u7CBMLJxoNad1RPeh9dmsXgMOzs2NCIDvhJa4RYxQ,5121
6
6
  nucliadb_models/entities.py,sha256=i-7Y8qmFRRTih5zw0ajv1U_iiXexe66M3TK8hUikQZk,2356
7
7
  nucliadb_models/export_import.py,sha256=mNm9IArOLnC6TLupkwqVFhxD5d08mpIVOVFneECv8UA,1073
8
- nucliadb_models/external_index_providers.py,sha256=IIKjJjLixWQC1zrbzam2FDcAo5UUxShZfueZSxqZu8Y,1535
8
+ nucliadb_models/external_index_providers.py,sha256=pL3leo4MkuJOnKlU1Sg6GT_mnK_VUBxGui-RPmDYVWU,1126
9
9
  nucliadb_models/extracted.py,sha256=Owz7LC3le3Dvau3TtRiO8NY84meOf6IxN-RrOqqpMPs,5593
10
10
  nucliadb_models/file.py,sha256=tXtgB9c7i2ADsnJ7HdbXyroAmXadGvOeA49htBh7BZo,2263
11
11
  nucliadb_models/filters.py,sha256=NQI2-4AFzzJuZy8NeY3jXlTbbU5wxiwMCP-5DrD-7lE,14759
12
12
  nucliadb_models/hydration.py,sha256=7SFnAcTQRE9etVccpph6aA1AUqsHVwkzT4YF6Uzl0Gs,14262
13
13
  nucliadb_models/labels.py,sha256=9zqRgkpZuX3kUPwsTTgCH7JyOWK7dM5pwyuHJR86YdU,3949
14
14
  nucliadb_models/link.py,sha256=PF5hHLwdOed5TMBTxtokkgWtMh1bFnORZjybh0NwVCw,2526
15
- nucliadb_models/metadata.py,sha256=MFVYnpXMBoY4ylMg029o7yDKGxhK7NB0c0FSshzJHm4,8356
15
+ nucliadb_models/metadata.py,sha256=OOKGy_83NtlG1QKQZEwMuwu4wbVEe7P30Y2QvnGSDto,8933
16
16
  nucliadb_models/notifications.py,sha256=mna8-AoD_29Wds0Thl0AF0zpERnJmYGLZX1w1fUopMY,4036
17
17
  nucliadb_models/processing.py,sha256=nhKuHQjqCdb9zJVkYGPTLub23tK9e_lwL5OCDVymZjY,719
18
18
  nucliadb_models/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -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.0.post5086.dist-info/METADATA,sha256=RsOejtEwMLd_HB-tIod2HtEDs6qhRkA9BVc3M8qB2OQ,794
37
- nucliadb_models-6.9.0.post5086.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
38
- nucliadb_models-6.9.0.post5086.dist-info/top_level.txt,sha256=UrY1I8oeovIRwkXLYplssTrxQdUjhSEFDFbnwaIV3tA,16
39
- nucliadb_models-6.9.0.post5086.dist-info/RECORD,,
36
+ nucliadb_models-6.9.0.post5100.dist-info/METADATA,sha256=EgFfMEjNkPT2XbZrPnpVqS57egZMNn8bM3ITtAWE9BE,794
37
+ nucliadb_models-6.9.0.post5100.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
38
+ nucliadb_models-6.9.0.post5100.dist-info/top_level.txt,sha256=UrY1I8oeovIRwkXLYplssTrxQdUjhSEFDFbnwaIV3tA,16
39
+ nucliadb_models-6.9.0.post5100.dist-info/RECORD,,