rapidata 2.12.0__py3-none-any.whl → 2.13.0__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 rapidata might be problematic. Click here for more details.

Files changed (70) hide show
  1. rapidata/__init__.py +0 -33
  2. rapidata/api_client/__init__.py +17 -39
  3. rapidata/api_client/api/__init__.py +0 -1
  4. rapidata/api_client/api/campaign_api.py +13 -13
  5. rapidata/api_client/api/datapoint_api.py +6 -6
  6. rapidata/api_client/api/dataset_api.py +574 -16
  7. rapidata/api_client/api/rapid_api.py +262 -0
  8. rapidata/api_client/api/validation_api.py +7 -7
  9. rapidata/api_client/models/__init__.py +17 -38
  10. rapidata/api_client/models/add_campaign_model.py +3 -3
  11. rapidata/api_client/models/add_campaign_model_user_filters_inner.py +224 -0
  12. rapidata/api_client/models/campaign_query_result.py +105 -0
  13. rapidata/api_client/models/campaign_query_result_paged_result.py +105 -0
  14. rapidata/api_client/models/classification_metadata_model.py +2 -4
  15. rapidata/api_client/models/compare_workflow_config.py +8 -10
  16. rapidata/api_client/models/compare_workflow_config_model.py +9 -11
  17. rapidata/api_client/models/compare_workflow_config_model_pair_maker_config.py +8 -22
  18. rapidata/api_client/models/compare_workflow_config_pair_maker_config.py +8 -22
  19. rapidata/api_client/models/compare_workflow_model.py +8 -10
  20. rapidata/api_client/models/compare_workflow_model1.py +8 -10
  21. rapidata/api_client/models/compare_workflow_model1_pair_maker_information.py +8 -22
  22. rapidata/api_client/models/compare_workflow_model_pair_maker_config.py +10 -24
  23. rapidata/api_client/models/count_metadata_model.py +2 -4
  24. rapidata/api_client/models/create_datapoint_from_urls_model.py +87 -0
  25. rapidata/api_client/models/create_datapoint_result.py +97 -0
  26. rapidata/api_client/models/create_order_model_user_filters_inner.py +23 -9
  27. rapidata/api_client/models/datapoint_state.py +38 -0
  28. rapidata/api_client/models/demographic.py +89 -0
  29. rapidata/api_client/models/demographic_metadata_model.py +18 -9
  30. rapidata/api_client/models/elo_config.py +91 -0
  31. rapidata/api_client/models/elo_config_model.py +91 -0
  32. rapidata/api_client/models/file_asset_model.py +18 -13
  33. rapidata/api_client/models/file_asset_model_metadata_value.py +266 -0
  34. rapidata/api_client/models/get_compare_workflow_results_model.py +1 -9
  35. rapidata/api_client/models/get_compare_workflow_results_result.py +6 -15
  36. rapidata/api_client/models/get_datapoint_by_id_result.py +114 -0
  37. rapidata/api_client/models/get_dataset_progress_result.py +93 -0
  38. rapidata/api_client/models/get_simple_workflow_results_result.py +3 -3
  39. rapidata/api_client/models/image_dimension_metadata_model.py +2 -4
  40. rapidata/api_client/models/inspect_report_result.py +92 -0
  41. rapidata/api_client/models/location_metadata_model.py +2 -4
  42. rapidata/api_client/models/multi_asset_model.py +18 -13
  43. rapidata/api_client/models/new_user_filter_model.py +94 -0
  44. rapidata/api_client/models/new_user_filter_model1.py +94 -0
  45. rapidata/api_client/models/null_asset_model.py +18 -13
  46. rapidata/api_client/models/online_pair_maker_config_model.py +1 -1
  47. rapidata/api_client/models/original_filename_metadata_model.py +2 -4
  48. rapidata/api_client/models/prompt_metadata_input.py +2 -4
  49. rapidata/api_client/models/prompt_metadata_model.py +2 -4
  50. rapidata/api_client/models/query_validation_rapids_result.py +14 -9
  51. rapidata/api_client/models/query_validation_rapids_result_asset.py +40 -40
  52. rapidata/api_client/models/report_model.py +11 -4
  53. rapidata/api_client/models/source_url_metadata_model.py +96 -0
  54. rapidata/api_client/models/text_asset_model.py +18 -13
  55. rapidata/api_client/models/text_metadata_model.py +2 -4
  56. rapidata/api_client/models/transcription_metadata_input.py +2 -4
  57. rapidata/api_client/models/transcription_metadata_model.py +1 -3
  58. rapidata/api_client/models/translated_prompt_metadata_model.py +2 -4
  59. rapidata/api_client/models/upload_from_s3_result.py +87 -0
  60. rapidata/api_client_README.md +20 -39
  61. rapidata/rapidata_client/metadata/_base_metadata.py +0 -3
  62. rapidata/rapidata_client/metadata/_private_text_metadata.py +2 -1
  63. rapidata/rapidata_client/metadata/_prompt_metadata.py +3 -3
  64. rapidata/rapidata_client/metadata/_public_text_metadata.py +2 -1
  65. rapidata/rapidata_client/metadata/_select_words_metadata.py +2 -4
  66. rapidata/rapidata_client/validation/validation_set_manager.py +3 -2
  67. {rapidata-2.12.0.dist-info → rapidata-2.13.0.dist-info}/METADATA +1 -1
  68. {rapidata-2.12.0.dist-info → rapidata-2.13.0.dist-info}/RECORD +70 -53
  69. {rapidata-2.12.0.dist-info → rapidata-2.13.0.dist-info}/LICENSE +0 -0
  70. {rapidata-2.12.0.dist-info → rapidata-2.13.0.dist-info}/WHEEL +0 -0
@@ -0,0 +1,92 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Rapidata.Dataset
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: v1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class InspectReportResult(BaseModel):
26
+ """
27
+ InspectReportResult
28
+ """ # noqa: E501
29
+ dump: Optional[StrictStr] = None
30
+ __properties: ClassVar[List[str]] = ["dump"]
31
+
32
+ model_config = ConfigDict(
33
+ populate_by_name=True,
34
+ validate_assignment=True,
35
+ protected_namespaces=(),
36
+ )
37
+
38
+
39
+ def to_str(self) -> str:
40
+ """Returns the string representation of the model using alias"""
41
+ return pprint.pformat(self.model_dump(by_alias=True))
42
+
43
+ def to_json(self) -> str:
44
+ """Returns the JSON representation of the model using alias"""
45
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
46
+ return json.dumps(self.to_dict())
47
+
48
+ @classmethod
49
+ def from_json(cls, json_str: str) -> Optional[Self]:
50
+ """Create an instance of InspectReportResult from a JSON string"""
51
+ return cls.from_dict(json.loads(json_str))
52
+
53
+ def to_dict(self) -> Dict[str, Any]:
54
+ """Return the dictionary representation of the model using alias.
55
+
56
+ This has the following differences from calling pydantic's
57
+ `self.model_dump(by_alias=True)`:
58
+
59
+ * `None` is only added to the output dict for nullable fields that
60
+ were set at model initialization. Other fields with value `None`
61
+ are ignored.
62
+ """
63
+ excluded_fields: Set[str] = set([
64
+ ])
65
+
66
+ _dict = self.model_dump(
67
+ by_alias=True,
68
+ exclude=excluded_fields,
69
+ exclude_none=True,
70
+ )
71
+ # set to None if dump (nullable) is None
72
+ # and model_fields_set contains the field
73
+ if self.dump is None and "dump" in self.model_fields_set:
74
+ _dict['dump'] = None
75
+
76
+ return _dict
77
+
78
+ @classmethod
79
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
80
+ """Create an instance of InspectReportResult from a dict"""
81
+ if obj is None:
82
+ return None
83
+
84
+ if not isinstance(obj, dict):
85
+ return cls.model_validate(obj)
86
+
87
+ _obj = cls.model_validate({
88
+ "dump": obj.get("dump")
89
+ })
90
+ return _obj
91
+
92
+
@@ -29,8 +29,7 @@ class LocationMetadataModel(BaseModel):
29
29
  t: StrictStr = Field(description="Discriminator value for LocationMetadata", alias="_t")
30
30
  x: Union[StrictFloat, StrictInt]
31
31
  y: Union[StrictFloat, StrictInt]
32
- identifier: StrictStr
33
- __properties: ClassVar[List[str]] = ["_t", "x", "y", "identifier"]
32
+ __properties: ClassVar[List[str]] = ["_t", "x", "y"]
34
33
 
35
34
  @field_validator('t')
36
35
  def t_validate_enum(cls, value):
@@ -92,8 +91,7 @@ class LocationMetadataModel(BaseModel):
92
91
  _obj = cls.model_validate({
93
92
  "_t": obj.get("_t") if obj.get("_t") is not None else 'LocationMetadata',
94
93
  "x": obj.get("x"),
95
- "y": obj.get("y"),
96
- "identifier": obj.get("identifier")
94
+ "y": obj.get("y")
97
95
  })
98
96
  return _obj
99
97
 
@@ -19,7 +19,7 @@ import json
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
21
21
  from typing import Any, ClassVar, Dict, List
22
- from rapidata.api_client.models.file_asset_model_metadata_inner import FileAssetModelMetadataInner
22
+ from rapidata.api_client.models.file_asset_model_metadata_value import FileAssetModelMetadataValue
23
23
  from typing import Optional, Set
24
24
  from typing_extensions import Self
25
25
 
@@ -27,17 +27,17 @@ class MultiAssetModel(BaseModel):
27
27
  """
28
28
  MultiAssetModel
29
29
  """ # noqa: E501
30
- t: StrictStr = Field(description="Discriminator value for MultiAssetModel", alias="_t")
30
+ t: StrictStr = Field(description="Discriminator value for MultiAsset", alias="_t")
31
31
  assets: List[DatapointModelAsset]
32
- metadata: List[FileAssetModelMetadataInner]
32
+ metadata: Dict[str, FileAssetModelMetadataValue]
33
33
  identifier: StrictStr
34
34
  __properties: ClassVar[List[str]] = ["_t", "assets", "metadata", "identifier"]
35
35
 
36
36
  @field_validator('t')
37
37
  def t_validate_enum(cls, value):
38
38
  """Validates the enum"""
39
- if value not in set(['MultiAssetModel']):
40
- raise ValueError("must be one of enum values ('MultiAssetModel')")
39
+ if value not in set(['MultiAsset']):
40
+ raise ValueError("must be one of enum values ('MultiAsset')")
41
41
  return value
42
42
 
43
43
  model_config = ConfigDict(
@@ -86,13 +86,13 @@ class MultiAssetModel(BaseModel):
86
86
  if _item_assets:
87
87
  _items.append(_item_assets.to_dict())
88
88
  _dict['assets'] = _items
89
- # override the default output from pydantic by calling `to_dict()` of each item in metadata (list)
90
- _items = []
89
+ # override the default output from pydantic by calling `to_dict()` of each value in metadata (dict)
90
+ _field_dict = {}
91
91
  if self.metadata:
92
- for _item_metadata in self.metadata:
93
- if _item_metadata:
94
- _items.append(_item_metadata.to_dict())
95
- _dict['metadata'] = _items
92
+ for _key_metadata in self.metadata:
93
+ if self.metadata[_key_metadata]:
94
+ _field_dict[_key_metadata] = self.metadata[_key_metadata].to_dict()
95
+ _dict['metadata'] = _field_dict
96
96
  return _dict
97
97
 
98
98
  @classmethod
@@ -105,9 +105,14 @@ class MultiAssetModel(BaseModel):
105
105
  return cls.model_validate(obj)
106
106
 
107
107
  _obj = cls.model_validate({
108
- "_t": obj.get("_t") if obj.get("_t") is not None else 'MultiAssetModel',
108
+ "_t": obj.get("_t") if obj.get("_t") is not None else 'MultiAsset',
109
109
  "assets": [DatapointModelAsset.from_dict(_item) for _item in obj["assets"]] if obj.get("assets") is not None else None,
110
- "metadata": [FileAssetModelMetadataInner.from_dict(_item) for _item in obj["metadata"]] if obj.get("metadata") is not None else None,
110
+ "metadata": dict(
111
+ (_k, FileAssetModelMetadataValue.from_dict(_v))
112
+ for _k, _v in obj["metadata"].items()
113
+ )
114
+ if obj.get("metadata") is not None
115
+ else None,
111
116
  "identifier": obj.get("identifier")
112
117
  })
113
118
  return _obj
@@ -0,0 +1,94 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Rapidata.Dataset
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: v1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
21
+ from typing import Any, ClassVar, Dict, List
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class NewUserFilterModel(BaseModel):
26
+ """
27
+ NewUserFilterModel
28
+ """ # noqa: E501
29
+ t: StrictStr = Field(description="Discriminator value for NewUserFilter", alias="_t")
30
+ __properties: ClassVar[List[str]] = ["_t"]
31
+
32
+ @field_validator('t')
33
+ def t_validate_enum(cls, value):
34
+ """Validates the enum"""
35
+ if value not in set(['NewUserFilter']):
36
+ raise ValueError("must be one of enum values ('NewUserFilter')")
37
+ return value
38
+
39
+ model_config = ConfigDict(
40
+ populate_by_name=True,
41
+ validate_assignment=True,
42
+ protected_namespaces=(),
43
+ )
44
+
45
+
46
+ def to_str(self) -> str:
47
+ """Returns the string representation of the model using alias"""
48
+ return pprint.pformat(self.model_dump(by_alias=True))
49
+
50
+ def to_json(self) -> str:
51
+ """Returns the JSON representation of the model using alias"""
52
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
53
+ return json.dumps(self.to_dict())
54
+
55
+ @classmethod
56
+ def from_json(cls, json_str: str) -> Optional[Self]:
57
+ """Create an instance of NewUserFilterModel from a JSON string"""
58
+ return cls.from_dict(json.loads(json_str))
59
+
60
+ def to_dict(self) -> Dict[str, Any]:
61
+ """Return the dictionary representation of the model using alias.
62
+
63
+ This has the following differences from calling pydantic's
64
+ `self.model_dump(by_alias=True)`:
65
+
66
+ * `None` is only added to the output dict for nullable fields that
67
+ were set at model initialization. Other fields with value `None`
68
+ are ignored.
69
+ """
70
+ excluded_fields: Set[str] = set([
71
+ ])
72
+
73
+ _dict = self.model_dump(
74
+ by_alias=True,
75
+ exclude=excluded_fields,
76
+ exclude_none=True,
77
+ )
78
+ return _dict
79
+
80
+ @classmethod
81
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
82
+ """Create an instance of NewUserFilterModel from a dict"""
83
+ if obj is None:
84
+ return None
85
+
86
+ if not isinstance(obj, dict):
87
+ return cls.model_validate(obj)
88
+
89
+ _obj = cls.model_validate({
90
+ "_t": obj.get("_t") if obj.get("_t") is not None else 'NewUserFilter'
91
+ })
92
+ return _obj
93
+
94
+
@@ -0,0 +1,94 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Rapidata.Dataset
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: v1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
21
+ from typing import Any, ClassVar, Dict, List
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class NewUserFilterModel1(BaseModel):
26
+ """
27
+ NewUserFilterModel1
28
+ """ # noqa: E501
29
+ t: StrictStr = Field(description="Discriminator value for NewUserFilterModel", alias="_t")
30
+ __properties: ClassVar[List[str]] = ["_t"]
31
+
32
+ @field_validator('t')
33
+ def t_validate_enum(cls, value):
34
+ """Validates the enum"""
35
+ if value not in set(['NewUserFilterModel']):
36
+ raise ValueError("must be one of enum values ('NewUserFilterModel')")
37
+ return value
38
+
39
+ model_config = ConfigDict(
40
+ populate_by_name=True,
41
+ validate_assignment=True,
42
+ protected_namespaces=(),
43
+ )
44
+
45
+
46
+ def to_str(self) -> str:
47
+ """Returns the string representation of the model using alias"""
48
+ return pprint.pformat(self.model_dump(by_alias=True))
49
+
50
+ def to_json(self) -> str:
51
+ """Returns the JSON representation of the model using alias"""
52
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
53
+ return json.dumps(self.to_dict())
54
+
55
+ @classmethod
56
+ def from_json(cls, json_str: str) -> Optional[Self]:
57
+ """Create an instance of NewUserFilterModel1 from a JSON string"""
58
+ return cls.from_dict(json.loads(json_str))
59
+
60
+ def to_dict(self) -> Dict[str, Any]:
61
+ """Return the dictionary representation of the model using alias.
62
+
63
+ This has the following differences from calling pydantic's
64
+ `self.model_dump(by_alias=True)`:
65
+
66
+ * `None` is only added to the output dict for nullable fields that
67
+ were set at model initialization. Other fields with value `None`
68
+ are ignored.
69
+ """
70
+ excluded_fields: Set[str] = set([
71
+ ])
72
+
73
+ _dict = self.model_dump(
74
+ by_alias=True,
75
+ exclude=excluded_fields,
76
+ exclude_none=True,
77
+ )
78
+ return _dict
79
+
80
+ @classmethod
81
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
82
+ """Create an instance of NewUserFilterModel1 from a dict"""
83
+ if obj is None:
84
+ return None
85
+
86
+ if not isinstance(obj, dict):
87
+ return cls.model_validate(obj)
88
+
89
+ _obj = cls.model_validate({
90
+ "_t": obj.get("_t") if obj.get("_t") is not None else 'NewUserFilterModel'
91
+ })
92
+ return _obj
93
+
94
+
@@ -19,7 +19,7 @@ import json
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
21
21
  from typing import Any, ClassVar, Dict, List
22
- from rapidata.api_client.models.file_asset_model_metadata_inner import FileAssetModelMetadataInner
22
+ from rapidata.api_client.models.file_asset_model_metadata_value import FileAssetModelMetadataValue
23
23
  from typing import Optional, Set
24
24
  from typing_extensions import Self
25
25
 
@@ -27,16 +27,16 @@ class NullAssetModel(BaseModel):
27
27
  """
28
28
  NullAssetModel
29
29
  """ # noqa: E501
30
- t: StrictStr = Field(description="Discriminator value for NullAssetModel", alias="_t")
31
- metadata: List[FileAssetModelMetadataInner]
30
+ t: StrictStr = Field(description="Discriminator value for NullAsset", alias="_t")
31
+ metadata: Dict[str, FileAssetModelMetadataValue]
32
32
  identifier: StrictStr
33
33
  __properties: ClassVar[List[str]] = ["_t", "metadata", "identifier"]
34
34
 
35
35
  @field_validator('t')
36
36
  def t_validate_enum(cls, value):
37
37
  """Validates the enum"""
38
- if value not in set(['NullAssetModel']):
39
- raise ValueError("must be one of enum values ('NullAssetModel')")
38
+ if value not in set(['NullAsset']):
39
+ raise ValueError("must be one of enum values ('NullAsset')")
40
40
  return value
41
41
 
42
42
  model_config = ConfigDict(
@@ -78,13 +78,13 @@ class NullAssetModel(BaseModel):
78
78
  exclude=excluded_fields,
79
79
  exclude_none=True,
80
80
  )
81
- # override the default output from pydantic by calling `to_dict()` of each item in metadata (list)
82
- _items = []
81
+ # override the default output from pydantic by calling `to_dict()` of each value in metadata (dict)
82
+ _field_dict = {}
83
83
  if self.metadata:
84
- for _item_metadata in self.metadata:
85
- if _item_metadata:
86
- _items.append(_item_metadata.to_dict())
87
- _dict['metadata'] = _items
84
+ for _key_metadata in self.metadata:
85
+ if self.metadata[_key_metadata]:
86
+ _field_dict[_key_metadata] = self.metadata[_key_metadata].to_dict()
87
+ _dict['metadata'] = _field_dict
88
88
  return _dict
89
89
 
90
90
  @classmethod
@@ -97,8 +97,13 @@ class NullAssetModel(BaseModel):
97
97
  return cls.model_validate(obj)
98
98
 
99
99
  _obj = cls.model_validate({
100
- "_t": obj.get("_t") if obj.get("_t") is not None else 'NullAssetModel',
101
- "metadata": [FileAssetModelMetadataInner.from_dict(_item) for _item in obj["metadata"]] if obj.get("metadata") is not None else None,
100
+ "_t": obj.get("_t") if obj.get("_t") is not None else 'NullAsset',
101
+ "metadata": dict(
102
+ (_k, FileAssetModelMetadataValue.from_dict(_v))
103
+ for _k, _v in obj["metadata"].items()
104
+ )
105
+ if obj.get("metadata") is not None
106
+ else None,
102
107
  "identifier": obj.get("identifier")
103
108
  })
104
109
  return _obj
@@ -28,7 +28,7 @@ class OnlinePairMakerConfigModel(BaseModel):
28
28
  """ # noqa: E501
29
29
  t: StrictStr = Field(description="Discriminator value for OnlinePairMaker", alias="_t")
30
30
  random_matches_ratio: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The ratio of random matches for the algorithm to burn-in.", alias="randomMatchesRatio")
31
- total_comparison_budget: StrictInt = Field(description="Total number of comparisons to carry out.", alias="totalComparisonBudget")
31
+ total_comparison_budget: Optional[StrictInt] = Field(default=None, description="Total number of comparisons to carry out.", alias="totalComparisonBudget")
32
32
  __properties: ClassVar[List[str]] = ["_t", "randomMatchesRatio", "totalComparisonBudget"]
33
33
 
34
34
  @field_validator('t')
@@ -28,8 +28,7 @@ class OriginalFilenameMetadataModel(BaseModel):
28
28
  """ # noqa: E501
29
29
  t: StrictStr = Field(description="Discriminator value for OriginalFilenameMetadata", alias="_t")
30
30
  original_filename: StrictStr = Field(alias="originalFilename")
31
- identifier: StrictStr
32
- __properties: ClassVar[List[str]] = ["_t", "originalFilename", "identifier"]
31
+ __properties: ClassVar[List[str]] = ["_t", "originalFilename"]
33
32
 
34
33
  @field_validator('t')
35
34
  def t_validate_enum(cls, value):
@@ -90,8 +89,7 @@ class OriginalFilenameMetadataModel(BaseModel):
90
89
 
91
90
  _obj = cls.model_validate({
92
91
  "_t": obj.get("_t") if obj.get("_t") is not None else 'OriginalFilenameMetadata',
93
- "originalFilename": obj.get("originalFilename"),
94
- "identifier": obj.get("identifier")
92
+ "originalFilename": obj.get("originalFilename")
95
93
  })
96
94
  return _obj
97
95
 
@@ -28,8 +28,7 @@ class PromptMetadataInput(BaseModel):
28
28
  """ # noqa: E501
29
29
  t: StrictStr = Field(description="Discriminator value for PromptMetadataInput", alias="_t")
30
30
  prompt: StrictStr
31
- identifier: StrictStr
32
- __properties: ClassVar[List[str]] = ["_t", "prompt", "identifier"]
31
+ __properties: ClassVar[List[str]] = ["_t", "prompt"]
33
32
 
34
33
  @field_validator('t')
35
34
  def t_validate_enum(cls, value):
@@ -90,8 +89,7 @@ class PromptMetadataInput(BaseModel):
90
89
 
91
90
  _obj = cls.model_validate({
92
91
  "_t": obj.get("_t") if obj.get("_t") is not None else 'PromptMetadataInput',
93
- "prompt": obj.get("prompt"),
94
- "identifier": obj.get("identifier")
92
+ "prompt": obj.get("prompt")
95
93
  })
96
94
  return _obj
97
95
 
@@ -28,8 +28,7 @@ class PromptMetadataModel(BaseModel):
28
28
  """ # noqa: E501
29
29
  t: StrictStr = Field(description="Discriminator value for PromptMetadata", alias="_t")
30
30
  prompt: StrictStr
31
- identifier: StrictStr
32
- __properties: ClassVar[List[str]] = ["_t", "prompt", "identifier"]
31
+ __properties: ClassVar[List[str]] = ["_t", "prompt"]
33
32
 
34
33
  @field_validator('t')
35
34
  def t_validate_enum(cls, value):
@@ -90,8 +89,7 @@ class PromptMetadataModel(BaseModel):
90
89
 
91
90
  _obj = cls.model_validate({
92
91
  "_t": obj.get("_t") if obj.get("_t") is not None else 'PromptMetadata',
93
- "prompt": obj.get("prompt"),
94
- "identifier": obj.get("identifier")
92
+ "prompt": obj.get("prompt")
95
93
  })
96
94
  return _obj
97
95
 
@@ -19,7 +19,7 @@ import json
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
21
21
  from typing import Any, ClassVar, Dict, List, Optional
22
- from rapidata.api_client.models.file_asset_model1_metadata_inner import FileAssetModel1MetadataInner
22
+ from rapidata.api_client.models.file_asset_model_metadata_value import FileAssetModelMetadataValue
23
23
  from rapidata.api_client.models.query_validation_rapids_result_asset import QueryValidationRapidsResultAsset
24
24
  from rapidata.api_client.models.query_validation_rapids_result_payload import QueryValidationRapidsResultPayload
25
25
  from rapidata.api_client.models.query_validation_rapids_result_truth import QueryValidationRapidsResultTruth
@@ -35,7 +35,7 @@ class QueryValidationRapidsResult(BaseModel):
35
35
  asset: Optional[QueryValidationRapidsResultAsset] = None
36
36
  truth: Optional[QueryValidationRapidsResultTruth] = None
37
37
  payload: QueryValidationRapidsResultPayload
38
- metadata: List[FileAssetModel1MetadataInner]
38
+ metadata: Dict[str, FileAssetModelMetadataValue]
39
39
  correct_validation_count: StrictInt = Field(alias="correctValidationCount")
40
40
  invalid_validation_count: StrictInt = Field(alias="invalidValidationCount")
41
41
  explanation: Optional[StrictStr] = None
@@ -89,13 +89,13 @@ class QueryValidationRapidsResult(BaseModel):
89
89
  # override the default output from pydantic by calling `to_dict()` of payload
90
90
  if self.payload:
91
91
  _dict['payload'] = self.payload.to_dict()
92
- # override the default output from pydantic by calling `to_dict()` of each item in metadata (list)
93
- _items = []
92
+ # override the default output from pydantic by calling `to_dict()` of each value in metadata (dict)
93
+ _field_dict = {}
94
94
  if self.metadata:
95
- for _item_metadata in self.metadata:
96
- if _item_metadata:
97
- _items.append(_item_metadata.to_dict())
98
- _dict['metadata'] = _items
95
+ for _key_metadata in self.metadata:
96
+ if self.metadata[_key_metadata]:
97
+ _field_dict[_key_metadata] = self.metadata[_key_metadata].to_dict()
98
+ _dict['metadata'] = _field_dict
99
99
  # set to None if asset (nullable) is None
100
100
  # and model_fields_set contains the field
101
101
  if self.asset is None and "asset" in self.model_fields_set:
@@ -128,7 +128,12 @@ class QueryValidationRapidsResult(BaseModel):
128
128
  "asset": QueryValidationRapidsResultAsset.from_dict(obj["asset"]) if obj.get("asset") is not None else None,
129
129
  "truth": QueryValidationRapidsResultTruth.from_dict(obj["truth"]) if obj.get("truth") is not None else None,
130
130
  "payload": QueryValidationRapidsResultPayload.from_dict(obj["payload"]) if obj.get("payload") is not None else None,
131
- "metadata": [FileAssetModel1MetadataInner.from_dict(_item) for _item in obj["metadata"]] if obj.get("metadata") is not None else None,
131
+ "metadata": dict(
132
+ (_k, FileAssetModelMetadataValue.from_dict(_v))
133
+ for _k, _v in obj["metadata"].items()
134
+ )
135
+ if obj.get("metadata") is not None
136
+ else None,
132
137
  "correctValidationCount": obj.get("correctValidationCount"),
133
138
  "invalidValidationCount": obj.get("invalidValidationCount"),
134
139
  "explanation": obj.get("explanation")