rapidata 2.28.4__py3-none-any.whl → 2.29.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.
- rapidata/__init__.py +1 -1
- rapidata/api_client/__init__.py +44 -17
- rapidata/api_client/api/__init__.py +1 -0
- rapidata/api_client/api/benchmark_api.py +2766 -0
- rapidata/api_client/api/campaign_api.py +0 -780
- rapidata/api_client/api/coco_api.py +0 -571
- rapidata/api_client/api/customer_rapid_api.py +332 -1
- rapidata/api_client/api/datapoint_api.py +0 -524
- rapidata/api_client/api/dataset_api.py +595 -2276
- rapidata/api_client/api/feedback_api.py +0 -270
- rapidata/api_client/api/identity_api.py +74 -888
- rapidata/api_client/api/leaderboard_api.py +1642 -259
- rapidata/api_client/api/order_api.py +617 -5692
- rapidata/api_client/api/pipeline_api.py +31 -334
- rapidata/api_client/api/validation_set_api.py +469 -3356
- rapidata/api_client/api/workflow_api.py +0 -799
- rapidata/api_client/models/__init__.py +43 -17
- rapidata/api_client/models/add_campaign_model.py +3 -3
- rapidata/api_client/models/add_validation_rapid_model.py +1 -3
- rapidata/api_client/models/add_validation_text_rapid_model.py +1 -3
- rapidata/api_client/models/and_user_filter_model.py +106 -0
- rapidata/api_client/models/and_user_filter_model_filters_inner.py +282 -0
- rapidata/api_client/models/benchmark_query_result.py +94 -0
- rapidata/api_client/models/benchmark_query_result_paged_result.py +105 -0
- rapidata/api_client/models/boost_leaderboard_model.py +89 -0
- rapidata/api_client/models/clone_order_model.py +2 -4
- rapidata/api_client/models/create_benchmark_model.py +87 -0
- rapidata/api_client/models/create_benchmark_participant_model.py +87 -0
- rapidata/api_client/models/create_benchmark_participant_result.py +89 -0
- rapidata/api_client/models/create_benchmark_result.py +87 -0
- rapidata/api_client/models/create_datapoint_result.py +4 -16
- rapidata/api_client/models/create_leaderboard_model.py +18 -2
- rapidata/api_client/models/create_leaderboard_result.py +5 -3
- rapidata/api_client/models/create_order_model.py +3 -3
- rapidata/api_client/models/file_asset_input.py +104 -0
- rapidata/api_client/models/file_asset_input1.py +104 -0
- rapidata/api_client/models/file_asset_input1_file.py +168 -0
- rapidata/api_client/models/file_asset_input2.py +104 -0
- rapidata/api_client/models/file_asset_input_file.py +182 -0
- rapidata/api_client/models/form_file_wrapper.py +120 -0
- rapidata/api_client/models/get_benchmark_by_id_query.py +96 -0
- rapidata/api_client/models/get_benchmark_by_id_query_result.py +94 -0
- rapidata/api_client/models/get_benchmark_by_id_query_result_paged_result.py +105 -0
- rapidata/api_client/models/get_benchmark_by_id_result.py +94 -0
- rapidata/api_client/models/get_participant_by_id_result.py +6 -22
- rapidata/api_client/models/get_standing_by_id_result.py +113 -0
- rapidata/api_client/models/get_validation_rapids_result.py +3 -3
- rapidata/api_client/models/get_workflow_results_result.py +3 -3
- rapidata/api_client/models/local_file_wrapper.py +120 -0
- rapidata/api_client/models/multi_asset_input.py +110 -0
- rapidata/api_client/models/multi_asset_input1.py +110 -0
- rapidata/api_client/models/multi_asset_input1_assets_inner.py +170 -0
- rapidata/api_client/models/multi_asset_input2.py +110 -0
- rapidata/api_client/models/multi_asset_input_assets_inner.py +170 -0
- rapidata/api_client/models/not_user_filter_model.py +3 -3
- rapidata/api_client/models/or_user_filter_model.py +3 -3
- rapidata/api_client/models/participant_by_benchmark.py +102 -0
- rapidata/api_client/models/participant_by_benchmark_paged_result.py +105 -0
- rapidata/api_client/models/participant_by_leaderboard.py +6 -2
- rapidata/api_client/models/participant_status.py +1 -4
- rapidata/api_client/models/pipeline_id_workflow_config_put_request.py +140 -0
- rapidata/api_client/models/potential_validation_rapid.py +103 -0
- rapidata/api_client/models/potential_validation_rapid_paged_result.py +105 -0
- rapidata/api_client/models/potential_validation_rapid_truth.py +280 -0
- rapidata/api_client/models/prompt_asset_metadata_input.py +3 -3
- rapidata/api_client/models/prompt_asset_metadata_input_asset.py +170 -0
- rapidata/api_client/models/prompt_by_benchmark_result.py +92 -0
- rapidata/api_client/models/prompt_by_benchmark_result_paged_result.py +105 -0
- rapidata/api_client/models/prompt_metadata_input.py +5 -3
- rapidata/api_client/models/proxy_file_wrapper.py +114 -0
- rapidata/api_client/models/query_validation_model.py +97 -0
- rapidata/api_client/models/rapid_model.py +3 -3
- rapidata/api_client/models/simple_workflow_config.py +3 -3
- rapidata/api_client/models/simple_workflow_model1.py +3 -3
- rapidata/api_client/models/standing_by_leaderboard.py +113 -0
- rapidata/api_client/models/standing_by_leaderboard_paged_result.py +105 -0
- rapidata/api_client/models/standing_status.py +38 -0
- rapidata/api_client/models/stream_file_wrapper.py +116 -0
- rapidata/api_client/models/submit_coco_model.py +1 -3
- rapidata/api_client/models/submit_prompt_model.py +89 -0
- rapidata/api_client/models/text_asset_input.py +100 -0
- rapidata/api_client/models/transcription_metadata_input.py +5 -3
- rapidata/api_client/models/validation_set_zip_post_request_blueprint.py +252 -0
- rapidata/api_client/models/zip_entry_file_wrapper.py +120 -0
- rapidata/api_client_README.md +67 -76
- rapidata/rapidata_client/benchmark/leaderboard/__init__.py +0 -0
- rapidata/rapidata_client/benchmark/leaderboard/rapidata_leaderboard.py +62 -0
- rapidata/rapidata_client/benchmark/rapidata_benchmark.py +227 -0
- rapidata/rapidata_client/benchmark/rapidata_benchmark_manager.py +83 -0
- rapidata/rapidata_client/filter/not_filter.py +2 -2
- rapidata/rapidata_client/filter/or_filter.py +2 -2
- rapidata/rapidata_client/metadata/__init__.py +1 -0
- rapidata/rapidata_client/metadata/_media_asset_metadata.py +8 -1
- rapidata/rapidata_client/metadata/_prompt_identifier_metadata.py +15 -0
- rapidata/rapidata_client/order/_rapidata_dataset.py +6 -6
- rapidata/rapidata_client/order/_rapidata_order_builder.py +4 -4
- rapidata/rapidata_client/order/rapidata_order.py +1 -1
- rapidata/rapidata_client/rapidata_client.py +3 -3
- rapidata/rapidata_client/validation/rapidata_validation_set.py +1 -1
- rapidata/rapidata_client/validation/rapids/rapids.py +4 -6
- rapidata/service/openapi_service.py +5 -0
- {rapidata-2.28.4.dist-info → rapidata-2.29.0.dist-info}/METADATA +1 -1
- {rapidata-2.28.4.dist-info → rapidata-2.29.0.dist-info}/RECORD +106 -57
- rapidata/rapidata_client/leaderboard/rapidata_leaderboard.py +0 -127
- rapidata/rapidata_client/leaderboard/rapidata_leaderboard_manager.py +0 -92
- /rapidata/rapidata_client/{leaderboard → benchmark}/__init__.py +0 -0
- {rapidata-2.28.4.dist-info → rapidata-2.29.0.dist-info}/LICENSE +0 -0
- {rapidata-2.28.4.dist-info → rapidata-2.29.0.dist-info}/WHEEL +0 -0
|
@@ -24,7 +24,6 @@ from rapidata.api_client.models.create_datapoint_from_text_sources_model import
|
|
|
24
24
|
from rapidata.api_client.models.create_datapoint_from_urls_model import CreateDatapointFromUrlsModel
|
|
25
25
|
from rapidata.api_client.models.create_datapoint_result import CreateDatapointResult
|
|
26
26
|
from rapidata.api_client.models.create_datapoints_from_s3_bucket_model import CreateDatapointsFromS3BucketModel
|
|
27
|
-
from rapidata.api_client.models.datapoint_metadata_model import DatapointMetadataModel
|
|
28
27
|
from rapidata.api_client.models.datapoint_model_paged_result import DatapointModelPagedResult
|
|
29
28
|
from rapidata.api_client.models.dataset_dataset_id_datapoints_post_request_metadata_inner import DatasetDatasetIdDatapointsPostRequestMetadataInner
|
|
30
29
|
from rapidata.api_client.models.get_dataset_by_id_result import GetDatasetByIdResult
|
|
@@ -33,9 +32,7 @@ from rapidata.api_client.models.get_failed_datapoints_result import GetFailedDat
|
|
|
33
32
|
from rapidata.api_client.models.import_from_file_result import ImportFromFileResult
|
|
34
33
|
from rapidata.api_client.models.query_model import QueryModel
|
|
35
34
|
from rapidata.api_client.models.update_dataset_name_model import UpdateDatasetNameModel
|
|
36
|
-
from rapidata.api_client.models.upload_files_from_s3_bucket_model import UploadFilesFromS3BucketModel
|
|
37
35
|
from rapidata.api_client.models.upload_from_s3_result import UploadFromS3Result
|
|
38
|
-
from rapidata.api_client.models.upload_text_sources_to_dataset_model import UploadTextSourcesToDatasetModel
|
|
39
36
|
|
|
40
37
|
from rapidata.api_client.api_client import ApiClient, RequestSerialized
|
|
41
38
|
from rapidata.api_client.api_response import ApiResponse
|
|
@@ -56,10 +53,10 @@ class DatasetApi:
|
|
|
56
53
|
|
|
57
54
|
|
|
58
55
|
@validate_call
|
|
59
|
-
def
|
|
56
|
+
def dataset_dataset_id_datapoints_csv_post(
|
|
60
57
|
self,
|
|
61
|
-
|
|
62
|
-
|
|
58
|
+
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to import the datapoints to.")],
|
|
59
|
+
file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The csv file to import.")] = None,
|
|
63
60
|
_request_timeout: Union[
|
|
64
61
|
None,
|
|
65
62
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -72,15 +69,14 @@ class DatasetApi:
|
|
|
72
69
|
_content_type: Optional[StrictStr] = None,
|
|
73
70
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
74
71
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
75
|
-
) ->
|
|
76
|
-
"""
|
|
72
|
+
) -> ImportFromFileResult:
|
|
73
|
+
"""Creates multiple datapoints from a csv.
|
|
77
74
|
|
|
78
|
-
If multiple files are uploaded, a multi asset datapoint will be created.
|
|
79
75
|
|
|
80
|
-
:param
|
|
81
|
-
:type
|
|
82
|
-
:param
|
|
83
|
-
:type
|
|
76
|
+
:param dataset_id: The id of the dataset to import the datapoints to. (required)
|
|
77
|
+
:type dataset_id: str
|
|
78
|
+
:param file: The csv file to import.
|
|
79
|
+
:type file: bytearray
|
|
84
80
|
:param _request_timeout: timeout setting for this request. If one
|
|
85
81
|
number provided, it will be total request
|
|
86
82
|
timeout. It can also be a pair (tuple) of
|
|
@@ -102,11 +98,10 @@ class DatasetApi:
|
|
|
102
98
|
:type _host_index: int, optional
|
|
103
99
|
:return: Returns the result object.
|
|
104
100
|
""" # noqa: E501
|
|
105
|
-
warnings.warn("POST /dataset/createdatapoint is deprecated.", DeprecationWarning)
|
|
106
101
|
|
|
107
|
-
_param = self.
|
|
108
|
-
|
|
109
|
-
|
|
102
|
+
_param = self._dataset_dataset_id_datapoints_csv_post_serialize(
|
|
103
|
+
dataset_id=dataset_id,
|
|
104
|
+
file=file,
|
|
110
105
|
_request_auth=_request_auth,
|
|
111
106
|
_content_type=_content_type,
|
|
112
107
|
_headers=_headers,
|
|
@@ -114,7 +109,7 @@ class DatasetApi:
|
|
|
114
109
|
)
|
|
115
110
|
|
|
116
111
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
117
|
-
'200': "
|
|
112
|
+
'200': "ImportFromFileResult",
|
|
118
113
|
}
|
|
119
114
|
response_data = self.api_client.call_api(
|
|
120
115
|
*_param,
|
|
@@ -128,10 +123,10 @@ class DatasetApi:
|
|
|
128
123
|
|
|
129
124
|
|
|
130
125
|
@validate_call
|
|
131
|
-
def
|
|
126
|
+
def dataset_dataset_id_datapoints_csv_post_with_http_info(
|
|
132
127
|
self,
|
|
133
|
-
|
|
134
|
-
|
|
128
|
+
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to import the datapoints to.")],
|
|
129
|
+
file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The csv file to import.")] = None,
|
|
135
130
|
_request_timeout: Union[
|
|
136
131
|
None,
|
|
137
132
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -144,15 +139,14 @@ class DatasetApi:
|
|
|
144
139
|
_content_type: Optional[StrictStr] = None,
|
|
145
140
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
146
141
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
147
|
-
) -> ApiResponse[
|
|
148
|
-
"""
|
|
142
|
+
) -> ApiResponse[ImportFromFileResult]:
|
|
143
|
+
"""Creates multiple datapoints from a csv.
|
|
149
144
|
|
|
150
|
-
If multiple files are uploaded, a multi asset datapoint will be created.
|
|
151
145
|
|
|
152
|
-
:param
|
|
153
|
-
:type
|
|
154
|
-
:param
|
|
155
|
-
:type
|
|
146
|
+
:param dataset_id: The id of the dataset to import the datapoints to. (required)
|
|
147
|
+
:type dataset_id: str
|
|
148
|
+
:param file: The csv file to import.
|
|
149
|
+
:type file: bytearray
|
|
156
150
|
:param _request_timeout: timeout setting for this request. If one
|
|
157
151
|
number provided, it will be total request
|
|
158
152
|
timeout. It can also be a pair (tuple) of
|
|
@@ -174,11 +168,10 @@ class DatasetApi:
|
|
|
174
168
|
:type _host_index: int, optional
|
|
175
169
|
:return: Returns the result object.
|
|
176
170
|
""" # noqa: E501
|
|
177
|
-
warnings.warn("POST /dataset/createdatapoint is deprecated.", DeprecationWarning)
|
|
178
171
|
|
|
179
|
-
_param = self.
|
|
180
|
-
|
|
181
|
-
|
|
172
|
+
_param = self._dataset_dataset_id_datapoints_csv_post_serialize(
|
|
173
|
+
dataset_id=dataset_id,
|
|
174
|
+
file=file,
|
|
182
175
|
_request_auth=_request_auth,
|
|
183
176
|
_content_type=_content_type,
|
|
184
177
|
_headers=_headers,
|
|
@@ -186,7 +179,7 @@ class DatasetApi:
|
|
|
186
179
|
)
|
|
187
180
|
|
|
188
181
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
189
|
-
'200': "
|
|
182
|
+
'200': "ImportFromFileResult",
|
|
190
183
|
}
|
|
191
184
|
response_data = self.api_client.call_api(
|
|
192
185
|
*_param,
|
|
@@ -200,10 +193,10 @@ class DatasetApi:
|
|
|
200
193
|
|
|
201
194
|
|
|
202
195
|
@validate_call
|
|
203
|
-
def
|
|
196
|
+
def dataset_dataset_id_datapoints_csv_post_without_preload_content(
|
|
204
197
|
self,
|
|
205
|
-
|
|
206
|
-
|
|
198
|
+
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to import the datapoints to.")],
|
|
199
|
+
file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The csv file to import.")] = None,
|
|
207
200
|
_request_timeout: Union[
|
|
208
201
|
None,
|
|
209
202
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -217,14 +210,13 @@ class DatasetApi:
|
|
|
217
210
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
218
211
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
219
212
|
) -> RESTResponseType:
|
|
220
|
-
"""
|
|
213
|
+
"""Creates multiple datapoints from a csv.
|
|
221
214
|
|
|
222
|
-
If multiple files are uploaded, a multi asset datapoint will be created.
|
|
223
215
|
|
|
224
|
-
:param
|
|
225
|
-
:type
|
|
226
|
-
:param
|
|
227
|
-
:type
|
|
216
|
+
:param dataset_id: The id of the dataset to import the datapoints to. (required)
|
|
217
|
+
:type dataset_id: str
|
|
218
|
+
:param file: The csv file to import.
|
|
219
|
+
:type file: bytearray
|
|
228
220
|
:param _request_timeout: timeout setting for this request. If one
|
|
229
221
|
number provided, it will be total request
|
|
230
222
|
timeout. It can also be a pair (tuple) of
|
|
@@ -246,11 +238,10 @@ class DatasetApi:
|
|
|
246
238
|
:type _host_index: int, optional
|
|
247
239
|
:return: Returns the result object.
|
|
248
240
|
""" # noqa: E501
|
|
249
|
-
warnings.warn("POST /dataset/createdatapoint is deprecated.", DeprecationWarning)
|
|
250
241
|
|
|
251
|
-
_param = self.
|
|
252
|
-
|
|
253
|
-
|
|
242
|
+
_param = self._dataset_dataset_id_datapoints_csv_post_serialize(
|
|
243
|
+
dataset_id=dataset_id,
|
|
244
|
+
file=file,
|
|
254
245
|
_request_auth=_request_auth,
|
|
255
246
|
_content_type=_content_type,
|
|
256
247
|
_headers=_headers,
|
|
@@ -258,7 +249,7 @@ class DatasetApi:
|
|
|
258
249
|
)
|
|
259
250
|
|
|
260
251
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
261
|
-
'200': "
|
|
252
|
+
'200': "ImportFromFileResult",
|
|
262
253
|
}
|
|
263
254
|
response_data = self.api_client.call_api(
|
|
264
255
|
*_param,
|
|
@@ -267,10 +258,10 @@ class DatasetApi:
|
|
|
267
258
|
return response_data.response
|
|
268
259
|
|
|
269
260
|
|
|
270
|
-
def
|
|
261
|
+
def _dataset_dataset_id_datapoints_csv_post_serialize(
|
|
271
262
|
self,
|
|
272
|
-
|
|
273
|
-
|
|
263
|
+
dataset_id,
|
|
264
|
+
file,
|
|
274
265
|
_request_auth,
|
|
275
266
|
_content_type,
|
|
276
267
|
_headers,
|
|
@@ -280,7 +271,6 @@ class DatasetApi:
|
|
|
280
271
|
_host = None
|
|
281
272
|
|
|
282
273
|
_collection_formats: Dict[str, str] = {
|
|
283
|
-
'files': 'multi',
|
|
284
274
|
}
|
|
285
275
|
|
|
286
276
|
_path_params: Dict[str, str] = {}
|
|
@@ -293,13 +283,13 @@ class DatasetApi:
|
|
|
293
283
|
_body_params: Optional[bytes] = None
|
|
294
284
|
|
|
295
285
|
# process the path parameters
|
|
286
|
+
if dataset_id is not None:
|
|
287
|
+
_path_params['datasetId'] = dataset_id
|
|
296
288
|
# process the query parameters
|
|
297
289
|
# process the header parameters
|
|
298
290
|
# process the form parameters
|
|
299
|
-
if
|
|
300
|
-
_files['
|
|
301
|
-
if model is not None:
|
|
302
|
-
_form_params.append(('model', model))
|
|
291
|
+
if file is not None:
|
|
292
|
+
_files['file'] = file
|
|
303
293
|
# process the body parameter
|
|
304
294
|
|
|
305
295
|
|
|
@@ -335,7 +325,7 @@ class DatasetApi:
|
|
|
335
325
|
|
|
336
326
|
return self.api_client.param_serialize(
|
|
337
327
|
method='POST',
|
|
338
|
-
resource_path='/dataset/
|
|
328
|
+
resource_path='/dataset/{datasetId}/datapoints/csv',
|
|
339
329
|
path_params=_path_params,
|
|
340
330
|
query_params=_query_params,
|
|
341
331
|
header_params=_header_params,
|
|
@@ -352,9 +342,9 @@ class DatasetApi:
|
|
|
352
342
|
|
|
353
343
|
|
|
354
344
|
@validate_call
|
|
355
|
-
def
|
|
345
|
+
def dataset_dataset_id_datapoints_failed_get(
|
|
356
346
|
self,
|
|
357
|
-
|
|
347
|
+
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get the failed datapoints of.")],
|
|
358
348
|
_request_timeout: Union[
|
|
359
349
|
None,
|
|
360
350
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -367,13 +357,13 @@ class DatasetApi:
|
|
|
367
357
|
_content_type: Optional[StrictStr] = None,
|
|
368
358
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
369
359
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
370
|
-
) ->
|
|
371
|
-
"""
|
|
360
|
+
) -> GetFailedDatapointsResult:
|
|
361
|
+
"""Gets a list of all datapoints that failed to upload.
|
|
372
362
|
|
|
373
|
-
|
|
363
|
+
A datapoint usually fails to upload when using a deferred upload mechanism such as when providing a URL and the URL is not accessible.
|
|
374
364
|
|
|
375
|
-
:param
|
|
376
|
-
:type
|
|
365
|
+
:param dataset_id: The id of the dataset to get the failed datapoints of. (required)
|
|
366
|
+
:type dataset_id: str
|
|
377
367
|
:param _request_timeout: timeout setting for this request. If one
|
|
378
368
|
number provided, it will be total request
|
|
379
369
|
timeout. It can also be a pair (tuple) of
|
|
@@ -395,10 +385,9 @@ class DatasetApi:
|
|
|
395
385
|
:type _host_index: int, optional
|
|
396
386
|
:return: Returns the result object.
|
|
397
387
|
""" # noqa: E501
|
|
398
|
-
warnings.warn("POST /dataset/creattextdatapoint is deprecated.", DeprecationWarning)
|
|
399
388
|
|
|
400
|
-
_param = self.
|
|
401
|
-
|
|
389
|
+
_param = self._dataset_dataset_id_datapoints_failed_get_serialize(
|
|
390
|
+
dataset_id=dataset_id,
|
|
402
391
|
_request_auth=_request_auth,
|
|
403
392
|
_content_type=_content_type,
|
|
404
393
|
_headers=_headers,
|
|
@@ -406,7 +395,7 @@ class DatasetApi:
|
|
|
406
395
|
)
|
|
407
396
|
|
|
408
397
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
409
|
-
'200': "
|
|
398
|
+
'200': "GetFailedDatapointsResult",
|
|
410
399
|
}
|
|
411
400
|
response_data = self.api_client.call_api(
|
|
412
401
|
*_param,
|
|
@@ -420,9 +409,9 @@ class DatasetApi:
|
|
|
420
409
|
|
|
421
410
|
|
|
422
411
|
@validate_call
|
|
423
|
-
def
|
|
412
|
+
def dataset_dataset_id_datapoints_failed_get_with_http_info(
|
|
424
413
|
self,
|
|
425
|
-
|
|
414
|
+
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get the failed datapoints of.")],
|
|
426
415
|
_request_timeout: Union[
|
|
427
416
|
None,
|
|
428
417
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -435,13 +424,13 @@ class DatasetApi:
|
|
|
435
424
|
_content_type: Optional[StrictStr] = None,
|
|
436
425
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
437
426
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
438
|
-
) -> ApiResponse[
|
|
439
|
-
"""
|
|
427
|
+
) -> ApiResponse[GetFailedDatapointsResult]:
|
|
428
|
+
"""Gets a list of all datapoints that failed to upload.
|
|
440
429
|
|
|
441
|
-
|
|
430
|
+
A datapoint usually fails to upload when using a deferred upload mechanism such as when providing a URL and the URL is not accessible.
|
|
442
431
|
|
|
443
|
-
:param
|
|
444
|
-
:type
|
|
432
|
+
:param dataset_id: The id of the dataset to get the failed datapoints of. (required)
|
|
433
|
+
:type dataset_id: str
|
|
445
434
|
:param _request_timeout: timeout setting for this request. If one
|
|
446
435
|
number provided, it will be total request
|
|
447
436
|
timeout. It can also be a pair (tuple) of
|
|
@@ -463,10 +452,9 @@ class DatasetApi:
|
|
|
463
452
|
:type _host_index: int, optional
|
|
464
453
|
:return: Returns the result object.
|
|
465
454
|
""" # noqa: E501
|
|
466
|
-
warnings.warn("POST /dataset/creattextdatapoint is deprecated.", DeprecationWarning)
|
|
467
455
|
|
|
468
|
-
_param = self.
|
|
469
|
-
|
|
456
|
+
_param = self._dataset_dataset_id_datapoints_failed_get_serialize(
|
|
457
|
+
dataset_id=dataset_id,
|
|
470
458
|
_request_auth=_request_auth,
|
|
471
459
|
_content_type=_content_type,
|
|
472
460
|
_headers=_headers,
|
|
@@ -474,7 +462,7 @@ class DatasetApi:
|
|
|
474
462
|
)
|
|
475
463
|
|
|
476
464
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
477
|
-
'200': "
|
|
465
|
+
'200': "GetFailedDatapointsResult",
|
|
478
466
|
}
|
|
479
467
|
response_data = self.api_client.call_api(
|
|
480
468
|
*_param,
|
|
@@ -488,9 +476,9 @@ class DatasetApi:
|
|
|
488
476
|
|
|
489
477
|
|
|
490
478
|
@validate_call
|
|
491
|
-
def
|
|
479
|
+
def dataset_dataset_id_datapoints_failed_get_without_preload_content(
|
|
492
480
|
self,
|
|
493
|
-
|
|
481
|
+
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get the failed datapoints of.")],
|
|
494
482
|
_request_timeout: Union[
|
|
495
483
|
None,
|
|
496
484
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -504,12 +492,12 @@ class DatasetApi:
|
|
|
504
492
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
505
493
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
506
494
|
) -> RESTResponseType:
|
|
507
|
-
"""
|
|
495
|
+
"""Gets a list of all datapoints that failed to upload.
|
|
508
496
|
|
|
509
|
-
|
|
497
|
+
A datapoint usually fails to upload when using a deferred upload mechanism such as when providing a URL and the URL is not accessible.
|
|
510
498
|
|
|
511
|
-
:param
|
|
512
|
-
:type
|
|
499
|
+
:param dataset_id: The id of the dataset to get the failed datapoints of. (required)
|
|
500
|
+
:type dataset_id: str
|
|
513
501
|
:param _request_timeout: timeout setting for this request. If one
|
|
514
502
|
number provided, it will be total request
|
|
515
503
|
timeout. It can also be a pair (tuple) of
|
|
@@ -531,10 +519,9 @@ class DatasetApi:
|
|
|
531
519
|
:type _host_index: int, optional
|
|
532
520
|
:return: Returns the result object.
|
|
533
521
|
""" # noqa: E501
|
|
534
|
-
warnings.warn("POST /dataset/creattextdatapoint is deprecated.", DeprecationWarning)
|
|
535
522
|
|
|
536
|
-
_param = self.
|
|
537
|
-
|
|
523
|
+
_param = self._dataset_dataset_id_datapoints_failed_get_serialize(
|
|
524
|
+
dataset_id=dataset_id,
|
|
538
525
|
_request_auth=_request_auth,
|
|
539
526
|
_content_type=_content_type,
|
|
540
527
|
_headers=_headers,
|
|
@@ -542,7 +529,7 @@ class DatasetApi:
|
|
|
542
529
|
)
|
|
543
530
|
|
|
544
531
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
545
|
-
'200': "
|
|
532
|
+
'200': "GetFailedDatapointsResult",
|
|
546
533
|
}
|
|
547
534
|
response_data = self.api_client.call_api(
|
|
548
535
|
*_param,
|
|
@@ -551,9 +538,9 @@ class DatasetApi:
|
|
|
551
538
|
return response_data.response
|
|
552
539
|
|
|
553
540
|
|
|
554
|
-
def
|
|
541
|
+
def _dataset_dataset_id_datapoints_failed_get_serialize(
|
|
555
542
|
self,
|
|
556
|
-
|
|
543
|
+
dataset_id,
|
|
557
544
|
_request_auth,
|
|
558
545
|
_content_type,
|
|
559
546
|
_headers,
|
|
@@ -575,12 +562,12 @@ class DatasetApi:
|
|
|
575
562
|
_body_params: Optional[bytes] = None
|
|
576
563
|
|
|
577
564
|
# process the path parameters
|
|
565
|
+
if dataset_id is not None:
|
|
566
|
+
_path_params['datasetId'] = dataset_id
|
|
578
567
|
# process the query parameters
|
|
579
568
|
# process the header parameters
|
|
580
569
|
# process the form parameters
|
|
581
570
|
# process the body parameter
|
|
582
|
-
if upload_text_sources_to_dataset_model is not None:
|
|
583
|
-
_body_params = upload_text_sources_to_dataset_model
|
|
584
571
|
|
|
585
572
|
|
|
586
573
|
# set the HTTP header `Accept`
|
|
@@ -593,21 +580,6 @@ class DatasetApi:
|
|
|
593
580
|
]
|
|
594
581
|
)
|
|
595
582
|
|
|
596
|
-
# set the HTTP header `Content-Type`
|
|
597
|
-
if _content_type:
|
|
598
|
-
_header_params['Content-Type'] = _content_type
|
|
599
|
-
else:
|
|
600
|
-
_default_content_type = (
|
|
601
|
-
self.api_client.select_header_content_type(
|
|
602
|
-
[
|
|
603
|
-
'application/json',
|
|
604
|
-
'text/json',
|
|
605
|
-
'application/*+json'
|
|
606
|
-
]
|
|
607
|
-
)
|
|
608
|
-
)
|
|
609
|
-
if _default_content_type is not None:
|
|
610
|
-
_header_params['Content-Type'] = _default_content_type
|
|
611
583
|
|
|
612
584
|
# authentication setting
|
|
613
585
|
_auth_settings: List[str] = [
|
|
@@ -616,8 +588,8 @@ class DatasetApi:
|
|
|
616
588
|
]
|
|
617
589
|
|
|
618
590
|
return self.api_client.param_serialize(
|
|
619
|
-
method='
|
|
620
|
-
resource_path='/dataset/
|
|
591
|
+
method='GET',
|
|
592
|
+
resource_path='/dataset/{datasetId}/datapoints/failed',
|
|
621
593
|
path_params=_path_params,
|
|
622
594
|
query_params=_query_params,
|
|
623
595
|
header_params=_header_params,
|
|
@@ -634,10 +606,11 @@ class DatasetApi:
|
|
|
634
606
|
|
|
635
607
|
|
|
636
608
|
@validate_call
|
|
637
|
-
def
|
|
609
|
+
def dataset_dataset_id_datapoints_files_post(
|
|
638
610
|
self,
|
|
639
|
-
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to
|
|
640
|
-
|
|
611
|
+
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to create the datapoint in.")],
|
|
612
|
+
files: Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]] = None,
|
|
613
|
+
model: Optional[CreateDatapointFromFilesModel] = None,
|
|
641
614
|
_request_timeout: Union[
|
|
642
615
|
None,
|
|
643
616
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -650,14 +623,17 @@ class DatasetApi:
|
|
|
650
623
|
_content_type: Optional[StrictStr] = None,
|
|
651
624
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
652
625
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
653
|
-
) ->
|
|
654
|
-
"""Creates
|
|
626
|
+
) -> CreateDatapointResult:
|
|
627
|
+
"""Creates a single datapoint by uploading files.
|
|
655
628
|
|
|
629
|
+
If multiple files are uploaded, a multi asset datapoint will be created.
|
|
656
630
|
|
|
657
|
-
:param dataset_id: The id of the dataset to
|
|
631
|
+
:param dataset_id: The id of the dataset to create the datapoint in. (required)
|
|
658
632
|
:type dataset_id: str
|
|
659
|
-
:param
|
|
660
|
-
:type
|
|
633
|
+
:param files:
|
|
634
|
+
:type files: List[bytearray]
|
|
635
|
+
:param model:
|
|
636
|
+
:type model: CreateDatapointFromFilesModel
|
|
661
637
|
:param _request_timeout: timeout setting for this request. If one
|
|
662
638
|
number provided, it will be total request
|
|
663
639
|
timeout. It can also be a pair (tuple) of
|
|
@@ -680,9 +656,10 @@ class DatasetApi:
|
|
|
680
656
|
:return: Returns the result object.
|
|
681
657
|
""" # noqa: E501
|
|
682
658
|
|
|
683
|
-
_param = self.
|
|
659
|
+
_param = self._dataset_dataset_id_datapoints_files_post_serialize(
|
|
684
660
|
dataset_id=dataset_id,
|
|
685
|
-
|
|
661
|
+
files=files,
|
|
662
|
+
model=model,
|
|
686
663
|
_request_auth=_request_auth,
|
|
687
664
|
_content_type=_content_type,
|
|
688
665
|
_headers=_headers,
|
|
@@ -690,7 +667,7 @@ class DatasetApi:
|
|
|
690
667
|
)
|
|
691
668
|
|
|
692
669
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
693
|
-
'200': "
|
|
670
|
+
'200': "CreateDatapointResult",
|
|
694
671
|
}
|
|
695
672
|
response_data = self.api_client.call_api(
|
|
696
673
|
*_param,
|
|
@@ -704,10 +681,11 @@ class DatasetApi:
|
|
|
704
681
|
|
|
705
682
|
|
|
706
683
|
@validate_call
|
|
707
|
-
def
|
|
684
|
+
def dataset_dataset_id_datapoints_files_post_with_http_info(
|
|
708
685
|
self,
|
|
709
|
-
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to
|
|
710
|
-
|
|
686
|
+
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to create the datapoint in.")],
|
|
687
|
+
files: Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]] = None,
|
|
688
|
+
model: Optional[CreateDatapointFromFilesModel] = None,
|
|
711
689
|
_request_timeout: Union[
|
|
712
690
|
None,
|
|
713
691
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -720,14 +698,17 @@ class DatasetApi:
|
|
|
720
698
|
_content_type: Optional[StrictStr] = None,
|
|
721
699
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
722
700
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
723
|
-
) -> ApiResponse[
|
|
724
|
-
"""Creates
|
|
701
|
+
) -> ApiResponse[CreateDatapointResult]:
|
|
702
|
+
"""Creates a single datapoint by uploading files.
|
|
725
703
|
|
|
704
|
+
If multiple files are uploaded, a multi asset datapoint will be created.
|
|
726
705
|
|
|
727
|
-
:param dataset_id: The id of the dataset to
|
|
706
|
+
:param dataset_id: The id of the dataset to create the datapoint in. (required)
|
|
728
707
|
:type dataset_id: str
|
|
729
|
-
:param
|
|
730
|
-
:type
|
|
708
|
+
:param files:
|
|
709
|
+
:type files: List[bytearray]
|
|
710
|
+
:param model:
|
|
711
|
+
:type model: CreateDatapointFromFilesModel
|
|
731
712
|
:param _request_timeout: timeout setting for this request. If one
|
|
732
713
|
number provided, it will be total request
|
|
733
714
|
timeout. It can also be a pair (tuple) of
|
|
@@ -750,9 +731,10 @@ class DatasetApi:
|
|
|
750
731
|
:return: Returns the result object.
|
|
751
732
|
""" # noqa: E501
|
|
752
733
|
|
|
753
|
-
_param = self.
|
|
734
|
+
_param = self._dataset_dataset_id_datapoints_files_post_serialize(
|
|
754
735
|
dataset_id=dataset_id,
|
|
755
|
-
|
|
736
|
+
files=files,
|
|
737
|
+
model=model,
|
|
756
738
|
_request_auth=_request_auth,
|
|
757
739
|
_content_type=_content_type,
|
|
758
740
|
_headers=_headers,
|
|
@@ -760,7 +742,7 @@ class DatasetApi:
|
|
|
760
742
|
)
|
|
761
743
|
|
|
762
744
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
763
|
-
'200': "
|
|
745
|
+
'200': "CreateDatapointResult",
|
|
764
746
|
}
|
|
765
747
|
response_data = self.api_client.call_api(
|
|
766
748
|
*_param,
|
|
@@ -774,10 +756,11 @@ class DatasetApi:
|
|
|
774
756
|
|
|
775
757
|
|
|
776
758
|
@validate_call
|
|
777
|
-
def
|
|
759
|
+
def dataset_dataset_id_datapoints_files_post_without_preload_content(
|
|
778
760
|
self,
|
|
779
|
-
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to
|
|
780
|
-
|
|
761
|
+
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to create the datapoint in.")],
|
|
762
|
+
files: Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]] = None,
|
|
763
|
+
model: Optional[CreateDatapointFromFilesModel] = None,
|
|
781
764
|
_request_timeout: Union[
|
|
782
765
|
None,
|
|
783
766
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -791,13 +774,16 @@ class DatasetApi:
|
|
|
791
774
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
792
775
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
793
776
|
) -> RESTResponseType:
|
|
794
|
-
"""Creates
|
|
777
|
+
"""Creates a single datapoint by uploading files.
|
|
795
778
|
|
|
779
|
+
If multiple files are uploaded, a multi asset datapoint will be created.
|
|
796
780
|
|
|
797
|
-
:param dataset_id: The id of the dataset to
|
|
781
|
+
:param dataset_id: The id of the dataset to create the datapoint in. (required)
|
|
798
782
|
:type dataset_id: str
|
|
799
|
-
:param
|
|
800
|
-
:type
|
|
783
|
+
:param files:
|
|
784
|
+
:type files: List[bytearray]
|
|
785
|
+
:param model:
|
|
786
|
+
:type model: CreateDatapointFromFilesModel
|
|
801
787
|
:param _request_timeout: timeout setting for this request. If one
|
|
802
788
|
number provided, it will be total request
|
|
803
789
|
timeout. It can also be a pair (tuple) of
|
|
@@ -820,9 +806,10 @@ class DatasetApi:
|
|
|
820
806
|
:return: Returns the result object.
|
|
821
807
|
""" # noqa: E501
|
|
822
808
|
|
|
823
|
-
_param = self.
|
|
809
|
+
_param = self._dataset_dataset_id_datapoints_files_post_serialize(
|
|
824
810
|
dataset_id=dataset_id,
|
|
825
|
-
|
|
811
|
+
files=files,
|
|
812
|
+
model=model,
|
|
826
813
|
_request_auth=_request_auth,
|
|
827
814
|
_content_type=_content_type,
|
|
828
815
|
_headers=_headers,
|
|
@@ -830,7 +817,7 @@ class DatasetApi:
|
|
|
830
817
|
)
|
|
831
818
|
|
|
832
819
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
833
|
-
'200': "
|
|
820
|
+
'200': "CreateDatapointResult",
|
|
834
821
|
}
|
|
835
822
|
response_data = self.api_client.call_api(
|
|
836
823
|
*_param,
|
|
@@ -839,10 +826,11 @@ class DatasetApi:
|
|
|
839
826
|
return response_data.response
|
|
840
827
|
|
|
841
828
|
|
|
842
|
-
def
|
|
829
|
+
def _dataset_dataset_id_datapoints_files_post_serialize(
|
|
843
830
|
self,
|
|
844
831
|
dataset_id,
|
|
845
|
-
|
|
832
|
+
files,
|
|
833
|
+
model,
|
|
846
834
|
_request_auth,
|
|
847
835
|
_content_type,
|
|
848
836
|
_headers,
|
|
@@ -852,6 +840,7 @@ class DatasetApi:
|
|
|
852
840
|
_host = None
|
|
853
841
|
|
|
854
842
|
_collection_formats: Dict[str, str] = {
|
|
843
|
+
'files': 'multi',
|
|
855
844
|
}
|
|
856
845
|
|
|
857
846
|
_path_params: Dict[str, str] = {}
|
|
@@ -869,8 +858,10 @@ class DatasetApi:
|
|
|
869
858
|
# process the query parameters
|
|
870
859
|
# process the header parameters
|
|
871
860
|
# process the form parameters
|
|
872
|
-
if
|
|
873
|
-
_files['
|
|
861
|
+
if files is not None:
|
|
862
|
+
_files['files'] = files
|
|
863
|
+
if model is not None:
|
|
864
|
+
_form_params.append(('model', model))
|
|
874
865
|
# process the body parameter
|
|
875
866
|
|
|
876
867
|
|
|
@@ -906,7 +897,7 @@ class DatasetApi:
|
|
|
906
897
|
|
|
907
898
|
return self.api_client.param_serialize(
|
|
908
899
|
method='POST',
|
|
909
|
-
resource_path='/dataset/{datasetId}/datapoints/
|
|
900
|
+
resource_path='/dataset/{datasetId}/datapoints/files',
|
|
910
901
|
path_params=_path_params,
|
|
911
902
|
query_params=_query_params,
|
|
912
903
|
header_params=_header_params,
|
|
@@ -923,9 +914,10 @@ class DatasetApi:
|
|
|
923
914
|
|
|
924
915
|
|
|
925
916
|
@validate_call
|
|
926
|
-
def
|
|
917
|
+
def dataset_dataset_id_datapoints_get(
|
|
927
918
|
self,
|
|
928
|
-
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get the
|
|
919
|
+
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get the datapoints of.")],
|
|
920
|
+
request: Annotated[Optional[QueryModel], Field(description="The query model to filter, sort, and paginate the results.")] = None,
|
|
929
921
|
_request_timeout: Union[
|
|
930
922
|
None,
|
|
931
923
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -938,13 +930,14 @@ class DatasetApi:
|
|
|
938
930
|
_content_type: Optional[StrictStr] = None,
|
|
939
931
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
940
932
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
941
|
-
) ->
|
|
942
|
-
"""Gets
|
|
933
|
+
) -> DatapointModelPagedResult:
|
|
934
|
+
"""Gets all datapoints of a dataset.
|
|
943
935
|
|
|
944
|
-
A datapoint usually fails to upload when using a deferred upload mechanism such as when providing a URL and the URL is not accessible.
|
|
945
936
|
|
|
946
|
-
:param dataset_id: The id of the dataset to get the
|
|
937
|
+
:param dataset_id: The id of the dataset to get the datapoints of. (required)
|
|
947
938
|
:type dataset_id: str
|
|
939
|
+
:param request: The query model to filter, sort, and paginate the results.
|
|
940
|
+
:type request: QueryModel
|
|
948
941
|
:param _request_timeout: timeout setting for this request. If one
|
|
949
942
|
number provided, it will be total request
|
|
950
943
|
timeout. It can also be a pair (tuple) of
|
|
@@ -967,8 +960,9 @@ class DatasetApi:
|
|
|
967
960
|
:return: Returns the result object.
|
|
968
961
|
""" # noqa: E501
|
|
969
962
|
|
|
970
|
-
_param = self.
|
|
963
|
+
_param = self._dataset_dataset_id_datapoints_get_serialize(
|
|
971
964
|
dataset_id=dataset_id,
|
|
965
|
+
request=request,
|
|
972
966
|
_request_auth=_request_auth,
|
|
973
967
|
_content_type=_content_type,
|
|
974
968
|
_headers=_headers,
|
|
@@ -976,7 +970,7 @@ class DatasetApi:
|
|
|
976
970
|
)
|
|
977
971
|
|
|
978
972
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
979
|
-
'200': "
|
|
973
|
+
'200': "DatapointModelPagedResult",
|
|
980
974
|
}
|
|
981
975
|
response_data = self.api_client.call_api(
|
|
982
976
|
*_param,
|
|
@@ -990,9 +984,10 @@ class DatasetApi:
|
|
|
990
984
|
|
|
991
985
|
|
|
992
986
|
@validate_call
|
|
993
|
-
def
|
|
987
|
+
def dataset_dataset_id_datapoints_get_with_http_info(
|
|
994
988
|
self,
|
|
995
|
-
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get the
|
|
989
|
+
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get the datapoints of.")],
|
|
990
|
+
request: Annotated[Optional[QueryModel], Field(description="The query model to filter, sort, and paginate the results.")] = None,
|
|
996
991
|
_request_timeout: Union[
|
|
997
992
|
None,
|
|
998
993
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1005,13 +1000,14 @@ class DatasetApi:
|
|
|
1005
1000
|
_content_type: Optional[StrictStr] = None,
|
|
1006
1001
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1007
1002
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1008
|
-
) -> ApiResponse[
|
|
1009
|
-
"""Gets
|
|
1003
|
+
) -> ApiResponse[DatapointModelPagedResult]:
|
|
1004
|
+
"""Gets all datapoints of a dataset.
|
|
1010
1005
|
|
|
1011
|
-
A datapoint usually fails to upload when using a deferred upload mechanism such as when providing a URL and the URL is not accessible.
|
|
1012
1006
|
|
|
1013
|
-
:param dataset_id: The id of the dataset to get the
|
|
1007
|
+
:param dataset_id: The id of the dataset to get the datapoints of. (required)
|
|
1014
1008
|
:type dataset_id: str
|
|
1009
|
+
:param request: The query model to filter, sort, and paginate the results.
|
|
1010
|
+
:type request: QueryModel
|
|
1015
1011
|
:param _request_timeout: timeout setting for this request. If one
|
|
1016
1012
|
number provided, it will be total request
|
|
1017
1013
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1034,8 +1030,9 @@ class DatasetApi:
|
|
|
1034
1030
|
:return: Returns the result object.
|
|
1035
1031
|
""" # noqa: E501
|
|
1036
1032
|
|
|
1037
|
-
_param = self.
|
|
1033
|
+
_param = self._dataset_dataset_id_datapoints_get_serialize(
|
|
1038
1034
|
dataset_id=dataset_id,
|
|
1035
|
+
request=request,
|
|
1039
1036
|
_request_auth=_request_auth,
|
|
1040
1037
|
_content_type=_content_type,
|
|
1041
1038
|
_headers=_headers,
|
|
@@ -1043,7 +1040,7 @@ class DatasetApi:
|
|
|
1043
1040
|
)
|
|
1044
1041
|
|
|
1045
1042
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1046
|
-
'200': "
|
|
1043
|
+
'200': "DatapointModelPagedResult",
|
|
1047
1044
|
}
|
|
1048
1045
|
response_data = self.api_client.call_api(
|
|
1049
1046
|
*_param,
|
|
@@ -1057,9 +1054,10 @@ class DatasetApi:
|
|
|
1057
1054
|
|
|
1058
1055
|
|
|
1059
1056
|
@validate_call
|
|
1060
|
-
def
|
|
1057
|
+
def dataset_dataset_id_datapoints_get_without_preload_content(
|
|
1061
1058
|
self,
|
|
1062
|
-
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get the
|
|
1059
|
+
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get the datapoints of.")],
|
|
1060
|
+
request: Annotated[Optional[QueryModel], Field(description="The query model to filter, sort, and paginate the results.")] = None,
|
|
1063
1061
|
_request_timeout: Union[
|
|
1064
1062
|
None,
|
|
1065
1063
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1073,12 +1071,13 @@ class DatasetApi:
|
|
|
1073
1071
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1074
1072
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1075
1073
|
) -> RESTResponseType:
|
|
1076
|
-
"""Gets
|
|
1074
|
+
"""Gets all datapoints of a dataset.
|
|
1077
1075
|
|
|
1078
|
-
A datapoint usually fails to upload when using a deferred upload mechanism such as when providing a URL and the URL is not accessible.
|
|
1079
1076
|
|
|
1080
|
-
:param dataset_id: The id of the dataset to get the
|
|
1077
|
+
:param dataset_id: The id of the dataset to get the datapoints of. (required)
|
|
1081
1078
|
:type dataset_id: str
|
|
1079
|
+
:param request: The query model to filter, sort, and paginate the results.
|
|
1080
|
+
:type request: QueryModel
|
|
1082
1081
|
:param _request_timeout: timeout setting for this request. If one
|
|
1083
1082
|
number provided, it will be total request
|
|
1084
1083
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1101,8 +1100,9 @@ class DatasetApi:
|
|
|
1101
1100
|
:return: Returns the result object.
|
|
1102
1101
|
""" # noqa: E501
|
|
1103
1102
|
|
|
1104
|
-
_param = self.
|
|
1103
|
+
_param = self._dataset_dataset_id_datapoints_get_serialize(
|
|
1105
1104
|
dataset_id=dataset_id,
|
|
1105
|
+
request=request,
|
|
1106
1106
|
_request_auth=_request_auth,
|
|
1107
1107
|
_content_type=_content_type,
|
|
1108
1108
|
_headers=_headers,
|
|
@@ -1110,7 +1110,7 @@ class DatasetApi:
|
|
|
1110
1110
|
)
|
|
1111
1111
|
|
|
1112
1112
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1113
|
-
'200': "
|
|
1113
|
+
'200': "DatapointModelPagedResult",
|
|
1114
1114
|
}
|
|
1115
1115
|
response_data = self.api_client.call_api(
|
|
1116
1116
|
*_param,
|
|
@@ -1119,9 +1119,10 @@ class DatasetApi:
|
|
|
1119
1119
|
return response_data.response
|
|
1120
1120
|
|
|
1121
1121
|
|
|
1122
|
-
def
|
|
1122
|
+
def _dataset_dataset_id_datapoints_get_serialize(
|
|
1123
1123
|
self,
|
|
1124
1124
|
dataset_id,
|
|
1125
|
+
request,
|
|
1125
1126
|
_request_auth,
|
|
1126
1127
|
_content_type,
|
|
1127
1128
|
_headers,
|
|
@@ -1146,6 +1147,10 @@ class DatasetApi:
|
|
|
1146
1147
|
if dataset_id is not None:
|
|
1147
1148
|
_path_params['datasetId'] = dataset_id
|
|
1148
1149
|
# process the query parameters
|
|
1150
|
+
if request is not None:
|
|
1151
|
+
|
|
1152
|
+
_query_params.append(('request', request))
|
|
1153
|
+
|
|
1149
1154
|
# process the header parameters
|
|
1150
1155
|
# process the form parameters
|
|
1151
1156
|
# process the body parameter
|
|
@@ -1170,7 +1175,7 @@ class DatasetApi:
|
|
|
1170
1175
|
|
|
1171
1176
|
return self.api_client.param_serialize(
|
|
1172
1177
|
method='GET',
|
|
1173
|
-
resource_path='/dataset/{datasetId}/datapoints
|
|
1178
|
+
resource_path='/dataset/{datasetId}/datapoints',
|
|
1174
1179
|
path_params=_path_params,
|
|
1175
1180
|
query_params=_query_params,
|
|
1176
1181
|
header_params=_header_params,
|
|
@@ -1187,11 +1192,15 @@ class DatasetApi:
|
|
|
1187
1192
|
|
|
1188
1193
|
|
|
1189
1194
|
@validate_call
|
|
1190
|
-
def
|
|
1195
|
+
def dataset_dataset_id_datapoints_post(
|
|
1191
1196
|
self,
|
|
1192
|
-
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset
|
|
1193
|
-
|
|
1194
|
-
|
|
1197
|
+
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset")],
|
|
1198
|
+
prompt_asset: Annotated[Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]], Field(description="The prompt asset is a file that can be added to the prompt metadata of the asset.")] = None,
|
|
1199
|
+
file: Annotated[Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]], Field(description="The files to upload from the local storage. Must be either images or videos.")] = None,
|
|
1200
|
+
text: Annotated[Optional[List[StrictStr]], Field(description="The texts to upload. The length limit is set at 256 characters per text.")] = None,
|
|
1201
|
+
url: Annotated[Optional[List[StrictStr]], Field(description="Creates an asset from a url. The url needs to point to a publicly accessible resource. The server will download the resource and store it as an asset in the background. <remarks> Additionally, to the urls having to be publicly accessible, they need to support HTTP HEAD requests. </remarks>")] = None,
|
|
1202
|
+
metadata: Annotated[Optional[List[DatasetDatasetIdDatapointsPostRequestMetadataInner]], Field(description="Optional metadata to attach to the datapoint.")] = None,
|
|
1203
|
+
sort_index: Annotated[Optional[StrictInt], Field(description="The index will be used to keep the datapoints in order. Useful if upload is parallelized")] = None,
|
|
1195
1204
|
_request_timeout: Union[
|
|
1196
1205
|
None,
|
|
1197
1206
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1205,16 +1214,24 @@ class DatasetApi:
|
|
|
1205
1214
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1206
1215
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1207
1216
|
) -> CreateDatapointResult:
|
|
1208
|
-
"""Creates a
|
|
1217
|
+
"""Creates a new datapoint from multiple possible sources.
|
|
1209
1218
|
|
|
1210
|
-
If multiple files are
|
|
1219
|
+
Multiple files, texts, and urls can be provided. If multiple files are provided, a multi-asset datapoint will be created, meaning that all sources provided will be stored as sub-assets of the datapoint. If multiple datapoints are desired, one should not pass in multiple files, texts, or urls, instead, one should call this endpoint multiple times with the desired file, text, or url per datapoint. The request must be a multipart form request, where each parameter is sent as a separate part. The files, texts, and urls can be mixed and matched as needed, however, at least one of them must be provided, and one should make sure that mixing them makes sense for the dataset.
|
|
1211
1220
|
|
|
1212
|
-
:param dataset_id: The id of the dataset
|
|
1221
|
+
:param dataset_id: The id of the dataset (required)
|
|
1213
1222
|
:type dataset_id: str
|
|
1214
|
-
:param
|
|
1215
|
-
:type
|
|
1216
|
-
:param
|
|
1217
|
-
:type
|
|
1223
|
+
:param prompt_asset: The prompt asset is a file that can be added to the prompt metadata of the asset.
|
|
1224
|
+
:type prompt_asset: List[bytearray]
|
|
1225
|
+
:param file: The files to upload from the local storage. Must be either images or videos.
|
|
1226
|
+
:type file: List[bytearray]
|
|
1227
|
+
:param text: The texts to upload. The length limit is set at 256 characters per text.
|
|
1228
|
+
:type text: List[str]
|
|
1229
|
+
:param url: Creates an asset from a url. The url needs to point to a publicly accessible resource. The server will download the resource and store it as an asset in the background. <remarks> Additionally, to the urls having to be publicly accessible, they need to support HTTP HEAD requests. </remarks>
|
|
1230
|
+
:type url: List[str]
|
|
1231
|
+
:param metadata: Optional metadata to attach to the datapoint.
|
|
1232
|
+
:type metadata: List[DatasetDatasetIdDatapointsPostRequestMetadataInner]
|
|
1233
|
+
:param sort_index: The index will be used to keep the datapoints in order. Useful if upload is parallelized
|
|
1234
|
+
:type sort_index: int
|
|
1218
1235
|
:param _request_timeout: timeout setting for this request. If one
|
|
1219
1236
|
number provided, it will be total request
|
|
1220
1237
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1237,10 +1254,14 @@ class DatasetApi:
|
|
|
1237
1254
|
:return: Returns the result object.
|
|
1238
1255
|
""" # noqa: E501
|
|
1239
1256
|
|
|
1240
|
-
_param = self.
|
|
1257
|
+
_param = self._dataset_dataset_id_datapoints_post_serialize(
|
|
1241
1258
|
dataset_id=dataset_id,
|
|
1242
|
-
|
|
1243
|
-
|
|
1259
|
+
prompt_asset=prompt_asset,
|
|
1260
|
+
file=file,
|
|
1261
|
+
text=text,
|
|
1262
|
+
url=url,
|
|
1263
|
+
metadata=metadata,
|
|
1264
|
+
sort_index=sort_index,
|
|
1244
1265
|
_request_auth=_request_auth,
|
|
1245
1266
|
_content_type=_content_type,
|
|
1246
1267
|
_headers=_headers,
|
|
@@ -1262,11 +1283,15 @@ class DatasetApi:
|
|
|
1262
1283
|
|
|
1263
1284
|
|
|
1264
1285
|
@validate_call
|
|
1265
|
-
def
|
|
1286
|
+
def dataset_dataset_id_datapoints_post_with_http_info(
|
|
1266
1287
|
self,
|
|
1267
|
-
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset
|
|
1268
|
-
|
|
1269
|
-
|
|
1288
|
+
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset")],
|
|
1289
|
+
prompt_asset: Annotated[Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]], Field(description="The prompt asset is a file that can be added to the prompt metadata of the asset.")] = None,
|
|
1290
|
+
file: Annotated[Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]], Field(description="The files to upload from the local storage. Must be either images or videos.")] = None,
|
|
1291
|
+
text: Annotated[Optional[List[StrictStr]], Field(description="The texts to upload. The length limit is set at 256 characters per text.")] = None,
|
|
1292
|
+
url: Annotated[Optional[List[StrictStr]], Field(description="Creates an asset from a url. The url needs to point to a publicly accessible resource. The server will download the resource and store it as an asset in the background. <remarks> Additionally, to the urls having to be publicly accessible, they need to support HTTP HEAD requests. </remarks>")] = None,
|
|
1293
|
+
metadata: Annotated[Optional[List[DatasetDatasetIdDatapointsPostRequestMetadataInner]], Field(description="Optional metadata to attach to the datapoint.")] = None,
|
|
1294
|
+
sort_index: Annotated[Optional[StrictInt], Field(description="The index will be used to keep the datapoints in order. Useful if upload is parallelized")] = None,
|
|
1270
1295
|
_request_timeout: Union[
|
|
1271
1296
|
None,
|
|
1272
1297
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1280,1824 +1305,24 @@ class DatasetApi:
|
|
|
1280
1305
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1281
1306
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1282
1307
|
) -> ApiResponse[CreateDatapointResult]:
|
|
1283
|
-
"""Creates a
|
|
1284
|
-
|
|
1285
|
-
If multiple files are uploaded, a multi asset datapoint will be created.
|
|
1286
|
-
|
|
1287
|
-
:param dataset_id: The id of the dataset to create the datapoint in. (required)
|
|
1288
|
-
:type dataset_id: str
|
|
1289
|
-
:param files:
|
|
1290
|
-
:type files: List[bytearray]
|
|
1291
|
-
:param model:
|
|
1292
|
-
:type model: CreateDatapointFromFilesModel
|
|
1293
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
1294
|
-
number provided, it will be total request
|
|
1295
|
-
timeout. It can also be a pair (tuple) of
|
|
1296
|
-
(connection, read) timeouts.
|
|
1297
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
1298
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
1299
|
-
request; this effectively ignores the
|
|
1300
|
-
authentication in the spec for a single request.
|
|
1301
|
-
:type _request_auth: dict, optional
|
|
1302
|
-
:param _content_type: force content-type for the request.
|
|
1303
|
-
:type _content_type: str, Optional
|
|
1304
|
-
:param _headers: set to override the headers for a single
|
|
1305
|
-
request; this effectively ignores the headers
|
|
1306
|
-
in the spec for a single request.
|
|
1307
|
-
:type _headers: dict, optional
|
|
1308
|
-
:param _host_index: set to override the host_index for a single
|
|
1309
|
-
request; this effectively ignores the host_index
|
|
1310
|
-
in the spec for a single request.
|
|
1311
|
-
:type _host_index: int, optional
|
|
1312
|
-
:return: Returns the result object.
|
|
1313
|
-
""" # noqa: E501
|
|
1314
|
-
|
|
1315
|
-
_param = self._dataset_dataset_id_datapoints_files_post_serialize(
|
|
1316
|
-
dataset_id=dataset_id,
|
|
1317
|
-
files=files,
|
|
1318
|
-
model=model,
|
|
1319
|
-
_request_auth=_request_auth,
|
|
1320
|
-
_content_type=_content_type,
|
|
1321
|
-
_headers=_headers,
|
|
1322
|
-
_host_index=_host_index
|
|
1323
|
-
)
|
|
1324
|
-
|
|
1325
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
1326
|
-
'200': "CreateDatapointResult",
|
|
1327
|
-
}
|
|
1328
|
-
response_data = self.api_client.call_api(
|
|
1329
|
-
*_param,
|
|
1330
|
-
_request_timeout=_request_timeout
|
|
1331
|
-
)
|
|
1332
|
-
response_data.read()
|
|
1333
|
-
return self.api_client.response_deserialize(
|
|
1334
|
-
response_data=response_data,
|
|
1335
|
-
response_types_map=_response_types_map,
|
|
1336
|
-
)
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
@validate_call
|
|
1340
|
-
def dataset_dataset_id_datapoints_files_post_without_preload_content(
|
|
1341
|
-
self,
|
|
1342
|
-
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to create the datapoint in.")],
|
|
1343
|
-
files: Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]] = None,
|
|
1344
|
-
model: Optional[CreateDatapointFromFilesModel] = None,
|
|
1345
|
-
_request_timeout: Union[
|
|
1346
|
-
None,
|
|
1347
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1348
|
-
Tuple[
|
|
1349
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1350
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
1351
|
-
]
|
|
1352
|
-
] = None,
|
|
1353
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1354
|
-
_content_type: Optional[StrictStr] = None,
|
|
1355
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1356
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1357
|
-
) -> RESTResponseType:
|
|
1358
|
-
"""Creates a single datapoint by uploading files.
|
|
1308
|
+
"""Creates a new datapoint from multiple possible sources.
|
|
1359
1309
|
|
|
1360
|
-
If multiple files are
|
|
1310
|
+
Multiple files, texts, and urls can be provided. If multiple files are provided, a multi-asset datapoint will be created, meaning that all sources provided will be stored as sub-assets of the datapoint. If multiple datapoints are desired, one should not pass in multiple files, texts, or urls, instead, one should call this endpoint multiple times with the desired file, text, or url per datapoint. The request must be a multipart form request, where each parameter is sent as a separate part. The files, texts, and urls can be mixed and matched as needed, however, at least one of them must be provided, and one should make sure that mixing them makes sense for the dataset.
|
|
1361
1311
|
|
|
1362
|
-
:param dataset_id: The id of the dataset
|
|
1363
|
-
:type dataset_id: str
|
|
1364
|
-
:param files:
|
|
1365
|
-
:type files: List[bytearray]
|
|
1366
|
-
:param model:
|
|
1367
|
-
:type model: CreateDatapointFromFilesModel
|
|
1368
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
1369
|
-
number provided, it will be total request
|
|
1370
|
-
timeout. It can also be a pair (tuple) of
|
|
1371
|
-
(connection, read) timeouts.
|
|
1372
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
1373
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
1374
|
-
request; this effectively ignores the
|
|
1375
|
-
authentication in the spec for a single request.
|
|
1376
|
-
:type _request_auth: dict, optional
|
|
1377
|
-
:param _content_type: force content-type for the request.
|
|
1378
|
-
:type _content_type: str, Optional
|
|
1379
|
-
:param _headers: set to override the headers for a single
|
|
1380
|
-
request; this effectively ignores the headers
|
|
1381
|
-
in the spec for a single request.
|
|
1382
|
-
:type _headers: dict, optional
|
|
1383
|
-
:param _host_index: set to override the host_index for a single
|
|
1384
|
-
request; this effectively ignores the host_index
|
|
1385
|
-
in the spec for a single request.
|
|
1386
|
-
:type _host_index: int, optional
|
|
1387
|
-
:return: Returns the result object.
|
|
1388
|
-
""" # noqa: E501
|
|
1389
|
-
|
|
1390
|
-
_param = self._dataset_dataset_id_datapoints_files_post_serialize(
|
|
1391
|
-
dataset_id=dataset_id,
|
|
1392
|
-
files=files,
|
|
1393
|
-
model=model,
|
|
1394
|
-
_request_auth=_request_auth,
|
|
1395
|
-
_content_type=_content_type,
|
|
1396
|
-
_headers=_headers,
|
|
1397
|
-
_host_index=_host_index
|
|
1398
|
-
)
|
|
1399
|
-
|
|
1400
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
1401
|
-
'200': "CreateDatapointResult",
|
|
1402
|
-
}
|
|
1403
|
-
response_data = self.api_client.call_api(
|
|
1404
|
-
*_param,
|
|
1405
|
-
_request_timeout=_request_timeout
|
|
1406
|
-
)
|
|
1407
|
-
return response_data.response
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
def _dataset_dataset_id_datapoints_files_post_serialize(
|
|
1411
|
-
self,
|
|
1412
|
-
dataset_id,
|
|
1413
|
-
files,
|
|
1414
|
-
model,
|
|
1415
|
-
_request_auth,
|
|
1416
|
-
_content_type,
|
|
1417
|
-
_headers,
|
|
1418
|
-
_host_index,
|
|
1419
|
-
) -> RequestSerialized:
|
|
1420
|
-
|
|
1421
|
-
_host = None
|
|
1422
|
-
|
|
1423
|
-
_collection_formats: Dict[str, str] = {
|
|
1424
|
-
'files': 'multi',
|
|
1425
|
-
}
|
|
1426
|
-
|
|
1427
|
-
_path_params: Dict[str, str] = {}
|
|
1428
|
-
_query_params: List[Tuple[str, str]] = []
|
|
1429
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1430
|
-
_form_params: List[Tuple[str, str]] = []
|
|
1431
|
-
_files: Dict[
|
|
1432
|
-
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1433
|
-
] = {}
|
|
1434
|
-
_body_params: Optional[bytes] = None
|
|
1435
|
-
|
|
1436
|
-
# process the path parameters
|
|
1437
|
-
if dataset_id is not None:
|
|
1438
|
-
_path_params['datasetId'] = dataset_id
|
|
1439
|
-
# process the query parameters
|
|
1440
|
-
# process the header parameters
|
|
1441
|
-
# process the form parameters
|
|
1442
|
-
if files is not None:
|
|
1443
|
-
_files['files'] = files
|
|
1444
|
-
if model is not None:
|
|
1445
|
-
_form_params.append(('model', model))
|
|
1446
|
-
# process the body parameter
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
# set the HTTP header `Accept`
|
|
1450
|
-
if 'Accept' not in _header_params:
|
|
1451
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1452
|
-
[
|
|
1453
|
-
'text/plain',
|
|
1454
|
-
'application/json',
|
|
1455
|
-
'text/json'
|
|
1456
|
-
]
|
|
1457
|
-
)
|
|
1458
|
-
|
|
1459
|
-
# set the HTTP header `Content-Type`
|
|
1460
|
-
if _content_type:
|
|
1461
|
-
_header_params['Content-Type'] = _content_type
|
|
1462
|
-
else:
|
|
1463
|
-
_default_content_type = (
|
|
1464
|
-
self.api_client.select_header_content_type(
|
|
1465
|
-
[
|
|
1466
|
-
'multipart/form-data'
|
|
1467
|
-
]
|
|
1468
|
-
)
|
|
1469
|
-
)
|
|
1470
|
-
if _default_content_type is not None:
|
|
1471
|
-
_header_params['Content-Type'] = _default_content_type
|
|
1472
|
-
|
|
1473
|
-
# authentication setting
|
|
1474
|
-
_auth_settings: List[str] = [
|
|
1475
|
-
'bearer',
|
|
1476
|
-
'oauth2'
|
|
1477
|
-
]
|
|
1478
|
-
|
|
1479
|
-
return self.api_client.param_serialize(
|
|
1480
|
-
method='POST',
|
|
1481
|
-
resource_path='/dataset/{datasetId}/datapoints/files',
|
|
1482
|
-
path_params=_path_params,
|
|
1483
|
-
query_params=_query_params,
|
|
1484
|
-
header_params=_header_params,
|
|
1485
|
-
body=_body_params,
|
|
1486
|
-
post_params=_form_params,
|
|
1487
|
-
files=_files,
|
|
1488
|
-
auth_settings=_auth_settings,
|
|
1489
|
-
collection_formats=_collection_formats,
|
|
1490
|
-
_host=_host,
|
|
1491
|
-
_request_auth=_request_auth
|
|
1492
|
-
)
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
@validate_call
|
|
1498
|
-
def dataset_dataset_id_datapoints_get(
|
|
1499
|
-
self,
|
|
1500
|
-
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get the datapoints of.")],
|
|
1501
|
-
request: Annotated[Optional[QueryModel], Field(description="The query model to filter, sort, and paginate the results.")] = None,
|
|
1502
|
-
_request_timeout: Union[
|
|
1503
|
-
None,
|
|
1504
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1505
|
-
Tuple[
|
|
1506
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1507
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
1508
|
-
]
|
|
1509
|
-
] = None,
|
|
1510
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1511
|
-
_content_type: Optional[StrictStr] = None,
|
|
1512
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1513
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1514
|
-
) -> DatapointModelPagedResult:
|
|
1515
|
-
"""Gets all datapoints of a dataset.
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
:param dataset_id: The id of the dataset to get the datapoints of. (required)
|
|
1519
|
-
:type dataset_id: str
|
|
1520
|
-
:param request: The query model to filter, sort, and paginate the results.
|
|
1521
|
-
:type request: QueryModel
|
|
1522
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
1523
|
-
number provided, it will be total request
|
|
1524
|
-
timeout. It can also be a pair (tuple) of
|
|
1525
|
-
(connection, read) timeouts.
|
|
1526
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
1527
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
1528
|
-
request; this effectively ignores the
|
|
1529
|
-
authentication in the spec for a single request.
|
|
1530
|
-
:type _request_auth: dict, optional
|
|
1531
|
-
:param _content_type: force content-type for the request.
|
|
1532
|
-
:type _content_type: str, Optional
|
|
1533
|
-
:param _headers: set to override the headers for a single
|
|
1534
|
-
request; this effectively ignores the headers
|
|
1535
|
-
in the spec for a single request.
|
|
1536
|
-
:type _headers: dict, optional
|
|
1537
|
-
:param _host_index: set to override the host_index for a single
|
|
1538
|
-
request; this effectively ignores the host_index
|
|
1539
|
-
in the spec for a single request.
|
|
1540
|
-
:type _host_index: int, optional
|
|
1541
|
-
:return: Returns the result object.
|
|
1542
|
-
""" # noqa: E501
|
|
1543
|
-
|
|
1544
|
-
_param = self._dataset_dataset_id_datapoints_get_serialize(
|
|
1545
|
-
dataset_id=dataset_id,
|
|
1546
|
-
request=request,
|
|
1547
|
-
_request_auth=_request_auth,
|
|
1548
|
-
_content_type=_content_type,
|
|
1549
|
-
_headers=_headers,
|
|
1550
|
-
_host_index=_host_index
|
|
1551
|
-
)
|
|
1552
|
-
|
|
1553
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
1554
|
-
'200': "DatapointModelPagedResult",
|
|
1555
|
-
}
|
|
1556
|
-
response_data = self.api_client.call_api(
|
|
1557
|
-
*_param,
|
|
1558
|
-
_request_timeout=_request_timeout
|
|
1559
|
-
)
|
|
1560
|
-
response_data.read()
|
|
1561
|
-
return self.api_client.response_deserialize(
|
|
1562
|
-
response_data=response_data,
|
|
1563
|
-
response_types_map=_response_types_map,
|
|
1564
|
-
).data
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
@validate_call
|
|
1568
|
-
def dataset_dataset_id_datapoints_get_with_http_info(
|
|
1569
|
-
self,
|
|
1570
|
-
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get the datapoints of.")],
|
|
1571
|
-
request: Annotated[Optional[QueryModel], Field(description="The query model to filter, sort, and paginate the results.")] = None,
|
|
1572
|
-
_request_timeout: Union[
|
|
1573
|
-
None,
|
|
1574
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1575
|
-
Tuple[
|
|
1576
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1577
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
1578
|
-
]
|
|
1579
|
-
] = None,
|
|
1580
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1581
|
-
_content_type: Optional[StrictStr] = None,
|
|
1582
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1583
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1584
|
-
) -> ApiResponse[DatapointModelPagedResult]:
|
|
1585
|
-
"""Gets all datapoints of a dataset.
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
:param dataset_id: The id of the dataset to get the datapoints of. (required)
|
|
1589
|
-
:type dataset_id: str
|
|
1590
|
-
:param request: The query model to filter, sort, and paginate the results.
|
|
1591
|
-
:type request: QueryModel
|
|
1592
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
1593
|
-
number provided, it will be total request
|
|
1594
|
-
timeout. It can also be a pair (tuple) of
|
|
1595
|
-
(connection, read) timeouts.
|
|
1596
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
1597
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
1598
|
-
request; this effectively ignores the
|
|
1599
|
-
authentication in the spec for a single request.
|
|
1600
|
-
:type _request_auth: dict, optional
|
|
1601
|
-
:param _content_type: force content-type for the request.
|
|
1602
|
-
:type _content_type: str, Optional
|
|
1603
|
-
:param _headers: set to override the headers for a single
|
|
1604
|
-
request; this effectively ignores the headers
|
|
1605
|
-
in the spec for a single request.
|
|
1606
|
-
:type _headers: dict, optional
|
|
1607
|
-
:param _host_index: set to override the host_index for a single
|
|
1608
|
-
request; this effectively ignores the host_index
|
|
1609
|
-
in the spec for a single request.
|
|
1610
|
-
:type _host_index: int, optional
|
|
1611
|
-
:return: Returns the result object.
|
|
1612
|
-
""" # noqa: E501
|
|
1613
|
-
|
|
1614
|
-
_param = self._dataset_dataset_id_datapoints_get_serialize(
|
|
1615
|
-
dataset_id=dataset_id,
|
|
1616
|
-
request=request,
|
|
1617
|
-
_request_auth=_request_auth,
|
|
1618
|
-
_content_type=_content_type,
|
|
1619
|
-
_headers=_headers,
|
|
1620
|
-
_host_index=_host_index
|
|
1621
|
-
)
|
|
1622
|
-
|
|
1623
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
1624
|
-
'200': "DatapointModelPagedResult",
|
|
1625
|
-
}
|
|
1626
|
-
response_data = self.api_client.call_api(
|
|
1627
|
-
*_param,
|
|
1628
|
-
_request_timeout=_request_timeout
|
|
1629
|
-
)
|
|
1630
|
-
response_data.read()
|
|
1631
|
-
return self.api_client.response_deserialize(
|
|
1632
|
-
response_data=response_data,
|
|
1633
|
-
response_types_map=_response_types_map,
|
|
1634
|
-
)
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
@validate_call
|
|
1638
|
-
def dataset_dataset_id_datapoints_get_without_preload_content(
|
|
1639
|
-
self,
|
|
1640
|
-
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get the datapoints of.")],
|
|
1641
|
-
request: Annotated[Optional[QueryModel], Field(description="The query model to filter, sort, and paginate the results.")] = None,
|
|
1642
|
-
_request_timeout: Union[
|
|
1643
|
-
None,
|
|
1644
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1645
|
-
Tuple[
|
|
1646
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1647
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
1648
|
-
]
|
|
1649
|
-
] = None,
|
|
1650
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1651
|
-
_content_type: Optional[StrictStr] = None,
|
|
1652
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1653
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1654
|
-
) -> RESTResponseType:
|
|
1655
|
-
"""Gets all datapoints of a dataset.
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
:param dataset_id: The id of the dataset to get the datapoints of. (required)
|
|
1659
|
-
:type dataset_id: str
|
|
1660
|
-
:param request: The query model to filter, sort, and paginate the results.
|
|
1661
|
-
:type request: QueryModel
|
|
1662
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
1663
|
-
number provided, it will be total request
|
|
1664
|
-
timeout. It can also be a pair (tuple) of
|
|
1665
|
-
(connection, read) timeouts.
|
|
1666
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
1667
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
1668
|
-
request; this effectively ignores the
|
|
1669
|
-
authentication in the spec for a single request.
|
|
1670
|
-
:type _request_auth: dict, optional
|
|
1671
|
-
:param _content_type: force content-type for the request.
|
|
1672
|
-
:type _content_type: str, Optional
|
|
1673
|
-
:param _headers: set to override the headers for a single
|
|
1674
|
-
request; this effectively ignores the headers
|
|
1675
|
-
in the spec for a single request.
|
|
1676
|
-
:type _headers: dict, optional
|
|
1677
|
-
:param _host_index: set to override the host_index for a single
|
|
1678
|
-
request; this effectively ignores the host_index
|
|
1679
|
-
in the spec for a single request.
|
|
1680
|
-
:type _host_index: int, optional
|
|
1681
|
-
:return: Returns the result object.
|
|
1682
|
-
""" # noqa: E501
|
|
1683
|
-
|
|
1684
|
-
_param = self._dataset_dataset_id_datapoints_get_serialize(
|
|
1685
|
-
dataset_id=dataset_id,
|
|
1686
|
-
request=request,
|
|
1687
|
-
_request_auth=_request_auth,
|
|
1688
|
-
_content_type=_content_type,
|
|
1689
|
-
_headers=_headers,
|
|
1690
|
-
_host_index=_host_index
|
|
1691
|
-
)
|
|
1692
|
-
|
|
1693
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
1694
|
-
'200': "DatapointModelPagedResult",
|
|
1695
|
-
}
|
|
1696
|
-
response_data = self.api_client.call_api(
|
|
1697
|
-
*_param,
|
|
1698
|
-
_request_timeout=_request_timeout
|
|
1699
|
-
)
|
|
1700
|
-
return response_data.response
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
def _dataset_dataset_id_datapoints_get_serialize(
|
|
1704
|
-
self,
|
|
1705
|
-
dataset_id,
|
|
1706
|
-
request,
|
|
1707
|
-
_request_auth,
|
|
1708
|
-
_content_type,
|
|
1709
|
-
_headers,
|
|
1710
|
-
_host_index,
|
|
1711
|
-
) -> RequestSerialized:
|
|
1712
|
-
|
|
1713
|
-
_host = None
|
|
1714
|
-
|
|
1715
|
-
_collection_formats: Dict[str, str] = {
|
|
1716
|
-
}
|
|
1717
|
-
|
|
1718
|
-
_path_params: Dict[str, str] = {}
|
|
1719
|
-
_query_params: List[Tuple[str, str]] = []
|
|
1720
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1721
|
-
_form_params: List[Tuple[str, str]] = []
|
|
1722
|
-
_files: Dict[
|
|
1723
|
-
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1724
|
-
] = {}
|
|
1725
|
-
_body_params: Optional[bytes] = None
|
|
1726
|
-
|
|
1727
|
-
# process the path parameters
|
|
1728
|
-
if dataset_id is not None:
|
|
1729
|
-
_path_params['datasetId'] = dataset_id
|
|
1730
|
-
# process the query parameters
|
|
1731
|
-
if request is not None:
|
|
1732
|
-
|
|
1733
|
-
_query_params.append(('request', request))
|
|
1734
|
-
|
|
1735
|
-
# process the header parameters
|
|
1736
|
-
# process the form parameters
|
|
1737
|
-
# process the body parameter
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
# set the HTTP header `Accept`
|
|
1741
|
-
if 'Accept' not in _header_params:
|
|
1742
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1743
|
-
[
|
|
1744
|
-
'text/plain',
|
|
1745
|
-
'application/json',
|
|
1746
|
-
'text/json'
|
|
1747
|
-
]
|
|
1748
|
-
)
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
# authentication setting
|
|
1752
|
-
_auth_settings: List[str] = [
|
|
1753
|
-
'bearer',
|
|
1754
|
-
'oauth2'
|
|
1755
|
-
]
|
|
1756
|
-
|
|
1757
|
-
return self.api_client.param_serialize(
|
|
1758
|
-
method='GET',
|
|
1759
|
-
resource_path='/dataset/{datasetId}/datapoints',
|
|
1760
|
-
path_params=_path_params,
|
|
1761
|
-
query_params=_query_params,
|
|
1762
|
-
header_params=_header_params,
|
|
1763
|
-
body=_body_params,
|
|
1764
|
-
post_params=_form_params,
|
|
1765
|
-
files=_files,
|
|
1766
|
-
auth_settings=_auth_settings,
|
|
1767
|
-
collection_formats=_collection_formats,
|
|
1768
|
-
_host=_host,
|
|
1769
|
-
_request_auth=_request_auth
|
|
1770
|
-
)
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
@validate_call
|
|
1776
|
-
def dataset_dataset_id_datapoints_post(
|
|
1777
|
-
self,
|
|
1778
|
-
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset")],
|
|
1779
|
-
file: Annotated[Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]], Field(description="The files to upload from the local storage. Must be either images or videos.")] = None,
|
|
1780
|
-
text: Annotated[Optional[List[StrictStr]], Field(description="The texts to upload. The length limit is set at 256 characters per text.")] = None,
|
|
1781
|
-
url: Annotated[Optional[List[StrictStr]], Field(description="Creates an asset from a url. The url needs to point to a publicly accessible resource. The server will download the resource and store it as an asset in the background. <remarks> Additionally, to the urls having to be publicly accessible, they need to support HTTP HEAD requests. </remarks>")] = None,
|
|
1782
|
-
metadata: Annotated[Optional[List[DatasetDatasetIdDatapointsPostRequestMetadataInner]], Field(description="Optional metadata to attach to the datapoint.")] = None,
|
|
1783
|
-
sort_index: Annotated[Optional[StrictInt], Field(description="The index will be used to keep the datapoints in order. Useful if upload is parallelized")] = None,
|
|
1784
|
-
_request_timeout: Union[
|
|
1785
|
-
None,
|
|
1786
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1787
|
-
Tuple[
|
|
1788
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1789
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
1790
|
-
]
|
|
1791
|
-
] = None,
|
|
1792
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1793
|
-
_content_type: Optional[StrictStr] = None,
|
|
1794
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1795
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1796
|
-
) -> CreateDatapointResult:
|
|
1797
|
-
"""Creates a new datapoint from multiple possible sources.
|
|
1798
|
-
|
|
1799
|
-
Multiple files, texts, and urls can be provided. If multiple files are provided, a multi-asset datapoint will be created, meaning that all sources provided will be stored as sub-assets of the datapoint. If multiple datapoints are desired, one should not pass in multiple files, texts, or urls, instead, one should call this endpoint multiple times with the desired file, text, or url per datapoint. The request must be a multipart form request, where each parameter is sent as a separate part. The files, texts, and urls can be mixed and matched as needed, however, at least one of them must be provided, and one should make sure that mixing them makes sense for the dataset.
|
|
1800
|
-
|
|
1801
|
-
:param dataset_id: The id of the dataset (required)
|
|
1802
|
-
:type dataset_id: str
|
|
1803
|
-
:param file: The files to upload from the local storage. Must be either images or videos.
|
|
1804
|
-
:type file: List[bytearray]
|
|
1805
|
-
:param text: The texts to upload. The length limit is set at 256 characters per text.
|
|
1806
|
-
:type text: List[str]
|
|
1807
|
-
:param url: Creates an asset from a url. The url needs to point to a publicly accessible resource. The server will download the resource and store it as an asset in the background. <remarks> Additionally, to the urls having to be publicly accessible, they need to support HTTP HEAD requests. </remarks>
|
|
1808
|
-
:type url: List[str]
|
|
1809
|
-
:param metadata: Optional metadata to attach to the datapoint.
|
|
1810
|
-
:type metadata: List[DatasetDatasetIdDatapointsPostRequestMetadataInner]
|
|
1811
|
-
:param sort_index: The index will be used to keep the datapoints in order. Useful if upload is parallelized
|
|
1812
|
-
:type sort_index: int
|
|
1813
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
1814
|
-
number provided, it will be total request
|
|
1815
|
-
timeout. It can also be a pair (tuple) of
|
|
1816
|
-
(connection, read) timeouts.
|
|
1817
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
1818
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
1819
|
-
request; this effectively ignores the
|
|
1820
|
-
authentication in the spec for a single request.
|
|
1821
|
-
:type _request_auth: dict, optional
|
|
1822
|
-
:param _content_type: force content-type for the request.
|
|
1823
|
-
:type _content_type: str, Optional
|
|
1824
|
-
:param _headers: set to override the headers for a single
|
|
1825
|
-
request; this effectively ignores the headers
|
|
1826
|
-
in the spec for a single request.
|
|
1827
|
-
:type _headers: dict, optional
|
|
1828
|
-
:param _host_index: set to override the host_index for a single
|
|
1829
|
-
request; this effectively ignores the host_index
|
|
1830
|
-
in the spec for a single request.
|
|
1831
|
-
:type _host_index: int, optional
|
|
1832
|
-
:return: Returns the result object.
|
|
1833
|
-
""" # noqa: E501
|
|
1834
|
-
|
|
1835
|
-
_param = self._dataset_dataset_id_datapoints_post_serialize(
|
|
1836
|
-
dataset_id=dataset_id,
|
|
1837
|
-
file=file,
|
|
1838
|
-
text=text,
|
|
1839
|
-
url=url,
|
|
1840
|
-
metadata=metadata,
|
|
1841
|
-
sort_index=sort_index,
|
|
1842
|
-
_request_auth=_request_auth,
|
|
1843
|
-
_content_type=_content_type,
|
|
1844
|
-
_headers=_headers,
|
|
1845
|
-
_host_index=_host_index
|
|
1846
|
-
)
|
|
1847
|
-
|
|
1848
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
1849
|
-
'200': "CreateDatapointResult",
|
|
1850
|
-
}
|
|
1851
|
-
response_data = self.api_client.call_api(
|
|
1852
|
-
*_param,
|
|
1853
|
-
_request_timeout=_request_timeout
|
|
1854
|
-
)
|
|
1855
|
-
response_data.read()
|
|
1856
|
-
return self.api_client.response_deserialize(
|
|
1857
|
-
response_data=response_data,
|
|
1858
|
-
response_types_map=_response_types_map,
|
|
1859
|
-
).data
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
@validate_call
|
|
1863
|
-
def dataset_dataset_id_datapoints_post_with_http_info(
|
|
1864
|
-
self,
|
|
1865
|
-
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset")],
|
|
1866
|
-
file: Annotated[Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]], Field(description="The files to upload from the local storage. Must be either images or videos.")] = None,
|
|
1867
|
-
text: Annotated[Optional[List[StrictStr]], Field(description="The texts to upload. The length limit is set at 256 characters per text.")] = None,
|
|
1868
|
-
url: Annotated[Optional[List[StrictStr]], Field(description="Creates an asset from a url. The url needs to point to a publicly accessible resource. The server will download the resource and store it as an asset in the background. <remarks> Additionally, to the urls having to be publicly accessible, they need to support HTTP HEAD requests. </remarks>")] = None,
|
|
1869
|
-
metadata: Annotated[Optional[List[DatasetDatasetIdDatapointsPostRequestMetadataInner]], Field(description="Optional metadata to attach to the datapoint.")] = None,
|
|
1870
|
-
sort_index: Annotated[Optional[StrictInt], Field(description="The index will be used to keep the datapoints in order. Useful if upload is parallelized")] = None,
|
|
1871
|
-
_request_timeout: Union[
|
|
1872
|
-
None,
|
|
1873
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1874
|
-
Tuple[
|
|
1875
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1876
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
1877
|
-
]
|
|
1878
|
-
] = None,
|
|
1879
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1880
|
-
_content_type: Optional[StrictStr] = None,
|
|
1881
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1882
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1883
|
-
) -> ApiResponse[CreateDatapointResult]:
|
|
1884
|
-
"""Creates a new datapoint from multiple possible sources.
|
|
1885
|
-
|
|
1886
|
-
Multiple files, texts, and urls can be provided. If multiple files are provided, a multi-asset datapoint will be created, meaning that all sources provided will be stored as sub-assets of the datapoint. If multiple datapoints are desired, one should not pass in multiple files, texts, or urls, instead, one should call this endpoint multiple times with the desired file, text, or url per datapoint. The request must be a multipart form request, where each parameter is sent as a separate part. The files, texts, and urls can be mixed and matched as needed, however, at least one of them must be provided, and one should make sure that mixing them makes sense for the dataset.
|
|
1887
|
-
|
|
1888
|
-
:param dataset_id: The id of the dataset (required)
|
|
1889
|
-
:type dataset_id: str
|
|
1890
|
-
:param file: The files to upload from the local storage. Must be either images or videos.
|
|
1891
|
-
:type file: List[bytearray]
|
|
1892
|
-
:param text: The texts to upload. The length limit is set at 256 characters per text.
|
|
1893
|
-
:type text: List[str]
|
|
1894
|
-
:param url: Creates an asset from a url. The url needs to point to a publicly accessible resource. The server will download the resource and store it as an asset in the background. <remarks> Additionally, to the urls having to be publicly accessible, they need to support HTTP HEAD requests. </remarks>
|
|
1895
|
-
:type url: List[str]
|
|
1896
|
-
:param metadata: Optional metadata to attach to the datapoint.
|
|
1897
|
-
:type metadata: List[DatasetDatasetIdDatapointsPostRequestMetadataInner]
|
|
1898
|
-
:param sort_index: The index will be used to keep the datapoints in order. Useful if upload is parallelized
|
|
1899
|
-
:type sort_index: int
|
|
1900
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
1901
|
-
number provided, it will be total request
|
|
1902
|
-
timeout. It can also be a pair (tuple) of
|
|
1903
|
-
(connection, read) timeouts.
|
|
1904
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
1905
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
1906
|
-
request; this effectively ignores the
|
|
1907
|
-
authentication in the spec for a single request.
|
|
1908
|
-
:type _request_auth: dict, optional
|
|
1909
|
-
:param _content_type: force content-type for the request.
|
|
1910
|
-
:type _content_type: str, Optional
|
|
1911
|
-
:param _headers: set to override the headers for a single
|
|
1912
|
-
request; this effectively ignores the headers
|
|
1913
|
-
in the spec for a single request.
|
|
1914
|
-
:type _headers: dict, optional
|
|
1915
|
-
:param _host_index: set to override the host_index for a single
|
|
1916
|
-
request; this effectively ignores the host_index
|
|
1917
|
-
in the spec for a single request.
|
|
1918
|
-
:type _host_index: int, optional
|
|
1919
|
-
:return: Returns the result object.
|
|
1920
|
-
""" # noqa: E501
|
|
1921
|
-
|
|
1922
|
-
_param = self._dataset_dataset_id_datapoints_post_serialize(
|
|
1923
|
-
dataset_id=dataset_id,
|
|
1924
|
-
file=file,
|
|
1925
|
-
text=text,
|
|
1926
|
-
url=url,
|
|
1927
|
-
metadata=metadata,
|
|
1928
|
-
sort_index=sort_index,
|
|
1929
|
-
_request_auth=_request_auth,
|
|
1930
|
-
_content_type=_content_type,
|
|
1931
|
-
_headers=_headers,
|
|
1932
|
-
_host_index=_host_index
|
|
1933
|
-
)
|
|
1934
|
-
|
|
1935
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
1936
|
-
'200': "CreateDatapointResult",
|
|
1937
|
-
}
|
|
1938
|
-
response_data = self.api_client.call_api(
|
|
1939
|
-
*_param,
|
|
1940
|
-
_request_timeout=_request_timeout
|
|
1941
|
-
)
|
|
1942
|
-
response_data.read()
|
|
1943
|
-
return self.api_client.response_deserialize(
|
|
1944
|
-
response_data=response_data,
|
|
1945
|
-
response_types_map=_response_types_map,
|
|
1946
|
-
)
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
@validate_call
|
|
1950
|
-
def dataset_dataset_id_datapoints_post_without_preload_content(
|
|
1951
|
-
self,
|
|
1952
|
-
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset")],
|
|
1953
|
-
file: Annotated[Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]], Field(description="The files to upload from the local storage. Must be either images or videos.")] = None,
|
|
1954
|
-
text: Annotated[Optional[List[StrictStr]], Field(description="The texts to upload. The length limit is set at 256 characters per text.")] = None,
|
|
1955
|
-
url: Annotated[Optional[List[StrictStr]], Field(description="Creates an asset from a url. The url needs to point to a publicly accessible resource. The server will download the resource and store it as an asset in the background. <remarks> Additionally, to the urls having to be publicly accessible, they need to support HTTP HEAD requests. </remarks>")] = None,
|
|
1956
|
-
metadata: Annotated[Optional[List[DatasetDatasetIdDatapointsPostRequestMetadataInner]], Field(description="Optional metadata to attach to the datapoint.")] = None,
|
|
1957
|
-
sort_index: Annotated[Optional[StrictInt], Field(description="The index will be used to keep the datapoints in order. Useful if upload is parallelized")] = None,
|
|
1958
|
-
_request_timeout: Union[
|
|
1959
|
-
None,
|
|
1960
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1961
|
-
Tuple[
|
|
1962
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
1963
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
1964
|
-
]
|
|
1965
|
-
] = None,
|
|
1966
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1967
|
-
_content_type: Optional[StrictStr] = None,
|
|
1968
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1969
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1970
|
-
) -> RESTResponseType:
|
|
1971
|
-
"""Creates a new datapoint from multiple possible sources.
|
|
1972
|
-
|
|
1973
|
-
Multiple files, texts, and urls can be provided. If multiple files are provided, a multi-asset datapoint will be created, meaning that all sources provided will be stored as sub-assets of the datapoint. If multiple datapoints are desired, one should not pass in multiple files, texts, or urls, instead, one should call this endpoint multiple times with the desired file, text, or url per datapoint. The request must be a multipart form request, where each parameter is sent as a separate part. The files, texts, and urls can be mixed and matched as needed, however, at least one of them must be provided, and one should make sure that mixing them makes sense for the dataset.
|
|
1974
|
-
|
|
1975
|
-
:param dataset_id: The id of the dataset (required)
|
|
1976
|
-
:type dataset_id: str
|
|
1977
|
-
:param file: The files to upload from the local storage. Must be either images or videos.
|
|
1978
|
-
:type file: List[bytearray]
|
|
1979
|
-
:param text: The texts to upload. The length limit is set at 256 characters per text.
|
|
1980
|
-
:type text: List[str]
|
|
1981
|
-
:param url: Creates an asset from a url. The url needs to point to a publicly accessible resource. The server will download the resource and store it as an asset in the background. <remarks> Additionally, to the urls having to be publicly accessible, they need to support HTTP HEAD requests. </remarks>
|
|
1982
|
-
:type url: List[str]
|
|
1983
|
-
:param metadata: Optional metadata to attach to the datapoint.
|
|
1984
|
-
:type metadata: List[DatasetDatasetIdDatapointsPostRequestMetadataInner]
|
|
1985
|
-
:param sort_index: The index will be used to keep the datapoints in order. Useful if upload is parallelized
|
|
1986
|
-
:type sort_index: int
|
|
1987
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
1988
|
-
number provided, it will be total request
|
|
1989
|
-
timeout. It can also be a pair (tuple) of
|
|
1990
|
-
(connection, read) timeouts.
|
|
1991
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
1992
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
1993
|
-
request; this effectively ignores the
|
|
1994
|
-
authentication in the spec for a single request.
|
|
1995
|
-
:type _request_auth: dict, optional
|
|
1996
|
-
:param _content_type: force content-type for the request.
|
|
1997
|
-
:type _content_type: str, Optional
|
|
1998
|
-
:param _headers: set to override the headers for a single
|
|
1999
|
-
request; this effectively ignores the headers
|
|
2000
|
-
in the spec for a single request.
|
|
2001
|
-
:type _headers: dict, optional
|
|
2002
|
-
:param _host_index: set to override the host_index for a single
|
|
2003
|
-
request; this effectively ignores the host_index
|
|
2004
|
-
in the spec for a single request.
|
|
2005
|
-
:type _host_index: int, optional
|
|
2006
|
-
:return: Returns the result object.
|
|
2007
|
-
""" # noqa: E501
|
|
2008
|
-
|
|
2009
|
-
_param = self._dataset_dataset_id_datapoints_post_serialize(
|
|
2010
|
-
dataset_id=dataset_id,
|
|
2011
|
-
file=file,
|
|
2012
|
-
text=text,
|
|
2013
|
-
url=url,
|
|
2014
|
-
metadata=metadata,
|
|
2015
|
-
sort_index=sort_index,
|
|
2016
|
-
_request_auth=_request_auth,
|
|
2017
|
-
_content_type=_content_type,
|
|
2018
|
-
_headers=_headers,
|
|
2019
|
-
_host_index=_host_index
|
|
2020
|
-
)
|
|
2021
|
-
|
|
2022
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
2023
|
-
'200': "CreateDatapointResult",
|
|
2024
|
-
}
|
|
2025
|
-
response_data = self.api_client.call_api(
|
|
2026
|
-
*_param,
|
|
2027
|
-
_request_timeout=_request_timeout
|
|
2028
|
-
)
|
|
2029
|
-
return response_data.response
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
def _dataset_dataset_id_datapoints_post_serialize(
|
|
2033
|
-
self,
|
|
2034
|
-
dataset_id,
|
|
2035
|
-
file,
|
|
2036
|
-
text,
|
|
2037
|
-
url,
|
|
2038
|
-
metadata,
|
|
2039
|
-
sort_index,
|
|
2040
|
-
_request_auth,
|
|
2041
|
-
_content_type,
|
|
2042
|
-
_headers,
|
|
2043
|
-
_host_index,
|
|
2044
|
-
) -> RequestSerialized:
|
|
2045
|
-
|
|
2046
|
-
_host = None
|
|
2047
|
-
|
|
2048
|
-
_collection_formats: Dict[str, str] = {
|
|
2049
|
-
'file': 'csv',
|
|
2050
|
-
'text': 'multi',
|
|
2051
|
-
'url': 'multi',
|
|
2052
|
-
'metadata': 'multi',
|
|
2053
|
-
}
|
|
2054
|
-
|
|
2055
|
-
_path_params: Dict[str, str] = {}
|
|
2056
|
-
_query_params: List[Tuple[str, str]] = []
|
|
2057
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2058
|
-
_form_params: List[Tuple[str, str]] = []
|
|
2059
|
-
_files: Dict[
|
|
2060
|
-
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2061
|
-
] = {}
|
|
2062
|
-
_body_params: Optional[bytes] = None
|
|
2063
|
-
|
|
2064
|
-
# process the path parameters
|
|
2065
|
-
if dataset_id is not None:
|
|
2066
|
-
_path_params['datasetId'] = dataset_id
|
|
2067
|
-
# process the query parameters
|
|
2068
|
-
# process the header parameters
|
|
2069
|
-
# process the form parameters
|
|
2070
|
-
if file is not None:
|
|
2071
|
-
_files['file'] = file
|
|
2072
|
-
if text is not None:
|
|
2073
|
-
_form_params.append(('text', text))
|
|
2074
|
-
if url is not None:
|
|
2075
|
-
_form_params.append(('url', url))
|
|
2076
|
-
if metadata is not None:
|
|
2077
|
-
_form_params.append(('metadata', metadata))
|
|
2078
|
-
if sort_index is not None:
|
|
2079
|
-
_form_params.append(('sortIndex', sort_index))
|
|
2080
|
-
# process the body parameter
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
# set the HTTP header `Accept`
|
|
2084
|
-
if 'Accept' not in _header_params:
|
|
2085
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2086
|
-
[
|
|
2087
|
-
'text/plain',
|
|
2088
|
-
'application/json',
|
|
2089
|
-
'text/json'
|
|
2090
|
-
]
|
|
2091
|
-
)
|
|
2092
|
-
|
|
2093
|
-
# set the HTTP header `Content-Type`
|
|
2094
|
-
if _content_type:
|
|
2095
|
-
_header_params['Content-Type'] = _content_type
|
|
2096
|
-
else:
|
|
2097
|
-
_default_content_type = (
|
|
2098
|
-
self.api_client.select_header_content_type(
|
|
2099
|
-
[
|
|
2100
|
-
'multipart/form-data'
|
|
2101
|
-
]
|
|
2102
|
-
)
|
|
2103
|
-
)
|
|
2104
|
-
if _default_content_type is not None:
|
|
2105
|
-
_header_params['Content-Type'] = _default_content_type
|
|
2106
|
-
|
|
2107
|
-
# authentication setting
|
|
2108
|
-
_auth_settings: List[str] = [
|
|
2109
|
-
'bearer',
|
|
2110
|
-
'oauth2'
|
|
2111
|
-
]
|
|
2112
|
-
|
|
2113
|
-
return self.api_client.param_serialize(
|
|
2114
|
-
method='POST',
|
|
2115
|
-
resource_path='/dataset/{datasetId}/datapoints',
|
|
2116
|
-
path_params=_path_params,
|
|
2117
|
-
query_params=_query_params,
|
|
2118
|
-
header_params=_header_params,
|
|
2119
|
-
body=_body_params,
|
|
2120
|
-
post_params=_form_params,
|
|
2121
|
-
files=_files,
|
|
2122
|
-
auth_settings=_auth_settings,
|
|
2123
|
-
collection_formats=_collection_formats,
|
|
2124
|
-
_host=_host,
|
|
2125
|
-
_request_auth=_request_auth
|
|
2126
|
-
)
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
@validate_call
|
|
2132
|
-
def dataset_dataset_id_datapoints_s3_post(
|
|
2133
|
-
self,
|
|
2134
|
-
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to upload the files to.")],
|
|
2135
|
-
create_datapoints_from_s3_bucket_model: Annotated[Optional[CreateDatapointsFromS3BucketModel], Field(description="The body of the request.")] = None,
|
|
2136
|
-
_request_timeout: Union[
|
|
2137
|
-
None,
|
|
2138
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
2139
|
-
Tuple[
|
|
2140
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
2141
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
2142
|
-
]
|
|
2143
|
-
] = None,
|
|
2144
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2145
|
-
_content_type: Optional[StrictStr] = None,
|
|
2146
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2147
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2148
|
-
) -> UploadFromS3Result:
|
|
2149
|
-
"""Uploads files from an S3 bucket to a dataset.
|
|
2150
|
-
|
|
2151
|
-
A new datapoint will be created for each file in the bucket.
|
|
2152
|
-
|
|
2153
|
-
:param dataset_id: The id of the dataset to upload the files to. (required)
|
|
2154
|
-
:type dataset_id: str
|
|
2155
|
-
:param create_datapoints_from_s3_bucket_model: The body of the request.
|
|
2156
|
-
:type create_datapoints_from_s3_bucket_model: CreateDatapointsFromS3BucketModel
|
|
2157
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
2158
|
-
number provided, it will be total request
|
|
2159
|
-
timeout. It can also be a pair (tuple) of
|
|
2160
|
-
(connection, read) timeouts.
|
|
2161
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
2162
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
2163
|
-
request; this effectively ignores the
|
|
2164
|
-
authentication in the spec for a single request.
|
|
2165
|
-
:type _request_auth: dict, optional
|
|
2166
|
-
:param _content_type: force content-type for the request.
|
|
2167
|
-
:type _content_type: str, Optional
|
|
2168
|
-
:param _headers: set to override the headers for a single
|
|
2169
|
-
request; this effectively ignores the headers
|
|
2170
|
-
in the spec for a single request.
|
|
2171
|
-
:type _headers: dict, optional
|
|
2172
|
-
:param _host_index: set to override the host_index for a single
|
|
2173
|
-
request; this effectively ignores the host_index
|
|
2174
|
-
in the spec for a single request.
|
|
2175
|
-
:type _host_index: int, optional
|
|
2176
|
-
:return: Returns the result object.
|
|
2177
|
-
""" # noqa: E501
|
|
2178
|
-
|
|
2179
|
-
_param = self._dataset_dataset_id_datapoints_s3_post_serialize(
|
|
2180
|
-
dataset_id=dataset_id,
|
|
2181
|
-
create_datapoints_from_s3_bucket_model=create_datapoints_from_s3_bucket_model,
|
|
2182
|
-
_request_auth=_request_auth,
|
|
2183
|
-
_content_type=_content_type,
|
|
2184
|
-
_headers=_headers,
|
|
2185
|
-
_host_index=_host_index
|
|
2186
|
-
)
|
|
2187
|
-
|
|
2188
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
2189
|
-
'200': "UploadFromS3Result",
|
|
2190
|
-
}
|
|
2191
|
-
response_data = self.api_client.call_api(
|
|
2192
|
-
*_param,
|
|
2193
|
-
_request_timeout=_request_timeout
|
|
2194
|
-
)
|
|
2195
|
-
response_data.read()
|
|
2196
|
-
return self.api_client.response_deserialize(
|
|
2197
|
-
response_data=response_data,
|
|
2198
|
-
response_types_map=_response_types_map,
|
|
2199
|
-
).data
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
@validate_call
|
|
2203
|
-
def dataset_dataset_id_datapoints_s3_post_with_http_info(
|
|
2204
|
-
self,
|
|
2205
|
-
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to upload the files to.")],
|
|
2206
|
-
create_datapoints_from_s3_bucket_model: Annotated[Optional[CreateDatapointsFromS3BucketModel], Field(description="The body of the request.")] = None,
|
|
2207
|
-
_request_timeout: Union[
|
|
2208
|
-
None,
|
|
2209
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
2210
|
-
Tuple[
|
|
2211
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
2212
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
2213
|
-
]
|
|
2214
|
-
] = None,
|
|
2215
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2216
|
-
_content_type: Optional[StrictStr] = None,
|
|
2217
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2218
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2219
|
-
) -> ApiResponse[UploadFromS3Result]:
|
|
2220
|
-
"""Uploads files from an S3 bucket to a dataset.
|
|
2221
|
-
|
|
2222
|
-
A new datapoint will be created for each file in the bucket.
|
|
2223
|
-
|
|
2224
|
-
:param dataset_id: The id of the dataset to upload the files to. (required)
|
|
2225
|
-
:type dataset_id: str
|
|
2226
|
-
:param create_datapoints_from_s3_bucket_model: The body of the request.
|
|
2227
|
-
:type create_datapoints_from_s3_bucket_model: CreateDatapointsFromS3BucketModel
|
|
2228
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
2229
|
-
number provided, it will be total request
|
|
2230
|
-
timeout. It can also be a pair (tuple) of
|
|
2231
|
-
(connection, read) timeouts.
|
|
2232
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
2233
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
2234
|
-
request; this effectively ignores the
|
|
2235
|
-
authentication in the spec for a single request.
|
|
2236
|
-
:type _request_auth: dict, optional
|
|
2237
|
-
:param _content_type: force content-type for the request.
|
|
2238
|
-
:type _content_type: str, Optional
|
|
2239
|
-
:param _headers: set to override the headers for a single
|
|
2240
|
-
request; this effectively ignores the headers
|
|
2241
|
-
in the spec for a single request.
|
|
2242
|
-
:type _headers: dict, optional
|
|
2243
|
-
:param _host_index: set to override the host_index for a single
|
|
2244
|
-
request; this effectively ignores the host_index
|
|
2245
|
-
in the spec for a single request.
|
|
2246
|
-
:type _host_index: int, optional
|
|
2247
|
-
:return: Returns the result object.
|
|
2248
|
-
""" # noqa: E501
|
|
2249
|
-
|
|
2250
|
-
_param = self._dataset_dataset_id_datapoints_s3_post_serialize(
|
|
2251
|
-
dataset_id=dataset_id,
|
|
2252
|
-
create_datapoints_from_s3_bucket_model=create_datapoints_from_s3_bucket_model,
|
|
2253
|
-
_request_auth=_request_auth,
|
|
2254
|
-
_content_type=_content_type,
|
|
2255
|
-
_headers=_headers,
|
|
2256
|
-
_host_index=_host_index
|
|
2257
|
-
)
|
|
2258
|
-
|
|
2259
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
2260
|
-
'200': "UploadFromS3Result",
|
|
2261
|
-
}
|
|
2262
|
-
response_data = self.api_client.call_api(
|
|
2263
|
-
*_param,
|
|
2264
|
-
_request_timeout=_request_timeout
|
|
2265
|
-
)
|
|
2266
|
-
response_data.read()
|
|
2267
|
-
return self.api_client.response_deserialize(
|
|
2268
|
-
response_data=response_data,
|
|
2269
|
-
response_types_map=_response_types_map,
|
|
2270
|
-
)
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
@validate_call
|
|
2274
|
-
def dataset_dataset_id_datapoints_s3_post_without_preload_content(
|
|
2275
|
-
self,
|
|
2276
|
-
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to upload the files to.")],
|
|
2277
|
-
create_datapoints_from_s3_bucket_model: Annotated[Optional[CreateDatapointsFromS3BucketModel], Field(description="The body of the request.")] = None,
|
|
2278
|
-
_request_timeout: Union[
|
|
2279
|
-
None,
|
|
2280
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
2281
|
-
Tuple[
|
|
2282
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
2283
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
2284
|
-
]
|
|
2285
|
-
] = None,
|
|
2286
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2287
|
-
_content_type: Optional[StrictStr] = None,
|
|
2288
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2289
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2290
|
-
) -> RESTResponseType:
|
|
2291
|
-
"""Uploads files from an S3 bucket to a dataset.
|
|
2292
|
-
|
|
2293
|
-
A new datapoint will be created for each file in the bucket.
|
|
2294
|
-
|
|
2295
|
-
:param dataset_id: The id of the dataset to upload the files to. (required)
|
|
2296
|
-
:type dataset_id: str
|
|
2297
|
-
:param create_datapoints_from_s3_bucket_model: The body of the request.
|
|
2298
|
-
:type create_datapoints_from_s3_bucket_model: CreateDatapointsFromS3BucketModel
|
|
2299
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
2300
|
-
number provided, it will be total request
|
|
2301
|
-
timeout. It can also be a pair (tuple) of
|
|
2302
|
-
(connection, read) timeouts.
|
|
2303
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
2304
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
2305
|
-
request; this effectively ignores the
|
|
2306
|
-
authentication in the spec for a single request.
|
|
2307
|
-
:type _request_auth: dict, optional
|
|
2308
|
-
:param _content_type: force content-type for the request.
|
|
2309
|
-
:type _content_type: str, Optional
|
|
2310
|
-
:param _headers: set to override the headers for a single
|
|
2311
|
-
request; this effectively ignores the headers
|
|
2312
|
-
in the spec for a single request.
|
|
2313
|
-
:type _headers: dict, optional
|
|
2314
|
-
:param _host_index: set to override the host_index for a single
|
|
2315
|
-
request; this effectively ignores the host_index
|
|
2316
|
-
in the spec for a single request.
|
|
2317
|
-
:type _host_index: int, optional
|
|
2318
|
-
:return: Returns the result object.
|
|
2319
|
-
""" # noqa: E501
|
|
2320
|
-
|
|
2321
|
-
_param = self._dataset_dataset_id_datapoints_s3_post_serialize(
|
|
2322
|
-
dataset_id=dataset_id,
|
|
2323
|
-
create_datapoints_from_s3_bucket_model=create_datapoints_from_s3_bucket_model,
|
|
2324
|
-
_request_auth=_request_auth,
|
|
2325
|
-
_content_type=_content_type,
|
|
2326
|
-
_headers=_headers,
|
|
2327
|
-
_host_index=_host_index
|
|
2328
|
-
)
|
|
2329
|
-
|
|
2330
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
2331
|
-
'200': "UploadFromS3Result",
|
|
2332
|
-
}
|
|
2333
|
-
response_data = self.api_client.call_api(
|
|
2334
|
-
*_param,
|
|
2335
|
-
_request_timeout=_request_timeout
|
|
2336
|
-
)
|
|
2337
|
-
return response_data.response
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
def _dataset_dataset_id_datapoints_s3_post_serialize(
|
|
2341
|
-
self,
|
|
2342
|
-
dataset_id,
|
|
2343
|
-
create_datapoints_from_s3_bucket_model,
|
|
2344
|
-
_request_auth,
|
|
2345
|
-
_content_type,
|
|
2346
|
-
_headers,
|
|
2347
|
-
_host_index,
|
|
2348
|
-
) -> RequestSerialized:
|
|
2349
|
-
|
|
2350
|
-
_host = None
|
|
2351
|
-
|
|
2352
|
-
_collection_formats: Dict[str, str] = {
|
|
2353
|
-
}
|
|
2354
|
-
|
|
2355
|
-
_path_params: Dict[str, str] = {}
|
|
2356
|
-
_query_params: List[Tuple[str, str]] = []
|
|
2357
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2358
|
-
_form_params: List[Tuple[str, str]] = []
|
|
2359
|
-
_files: Dict[
|
|
2360
|
-
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2361
|
-
] = {}
|
|
2362
|
-
_body_params: Optional[bytes] = None
|
|
2363
|
-
|
|
2364
|
-
# process the path parameters
|
|
2365
|
-
if dataset_id is not None:
|
|
2366
|
-
_path_params['datasetId'] = dataset_id
|
|
2367
|
-
# process the query parameters
|
|
2368
|
-
# process the header parameters
|
|
2369
|
-
# process the form parameters
|
|
2370
|
-
# process the body parameter
|
|
2371
|
-
if create_datapoints_from_s3_bucket_model is not None:
|
|
2372
|
-
_body_params = create_datapoints_from_s3_bucket_model
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
# set the HTTP header `Accept`
|
|
2376
|
-
if 'Accept' not in _header_params:
|
|
2377
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2378
|
-
[
|
|
2379
|
-
'text/plain',
|
|
2380
|
-
'application/json',
|
|
2381
|
-
'text/json'
|
|
2382
|
-
]
|
|
2383
|
-
)
|
|
2384
|
-
|
|
2385
|
-
# set the HTTP header `Content-Type`
|
|
2386
|
-
if _content_type:
|
|
2387
|
-
_header_params['Content-Type'] = _content_type
|
|
2388
|
-
else:
|
|
2389
|
-
_default_content_type = (
|
|
2390
|
-
self.api_client.select_header_content_type(
|
|
2391
|
-
[
|
|
2392
|
-
'application/json',
|
|
2393
|
-
'text/json',
|
|
2394
|
-
'application/*+json'
|
|
2395
|
-
]
|
|
2396
|
-
)
|
|
2397
|
-
)
|
|
2398
|
-
if _default_content_type is not None:
|
|
2399
|
-
_header_params['Content-Type'] = _default_content_type
|
|
2400
|
-
|
|
2401
|
-
# authentication setting
|
|
2402
|
-
_auth_settings: List[str] = [
|
|
2403
|
-
'bearer',
|
|
2404
|
-
'oauth2'
|
|
2405
|
-
]
|
|
2406
|
-
|
|
2407
|
-
return self.api_client.param_serialize(
|
|
2408
|
-
method='POST',
|
|
2409
|
-
resource_path='/dataset/{datasetId}/datapoints/s3',
|
|
2410
|
-
path_params=_path_params,
|
|
2411
|
-
query_params=_query_params,
|
|
2412
|
-
header_params=_header_params,
|
|
2413
|
-
body=_body_params,
|
|
2414
|
-
post_params=_form_params,
|
|
2415
|
-
files=_files,
|
|
2416
|
-
auth_settings=_auth_settings,
|
|
2417
|
-
collection_formats=_collection_formats,
|
|
2418
|
-
_host=_host,
|
|
2419
|
-
_request_auth=_request_auth
|
|
2420
|
-
)
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
@validate_call
|
|
2426
|
-
def dataset_dataset_id_datapoints_texts_post(
|
|
2427
|
-
self,
|
|
2428
|
-
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to create the datapoint in.")],
|
|
2429
|
-
create_datapoint_from_text_sources_model: Annotated[Optional[CreateDatapointFromTextSourcesModel], Field(description="The body of the request.")] = None,
|
|
2430
|
-
_request_timeout: Union[
|
|
2431
|
-
None,
|
|
2432
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
2433
|
-
Tuple[
|
|
2434
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
2435
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
2436
|
-
]
|
|
2437
|
-
] = None,
|
|
2438
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2439
|
-
_content_type: Optional[StrictStr] = None,
|
|
2440
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2441
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2442
|
-
) -> CreateDatapointResult:
|
|
2443
|
-
"""Creates a single datapoint from text sources.
|
|
2444
|
-
|
|
2445
|
-
If multiple text sources are uploaded, a multi asset datapoint will be created.
|
|
2446
|
-
|
|
2447
|
-
:param dataset_id: The id of the dataset to create the datapoint in. (required)
|
|
2448
|
-
:type dataset_id: str
|
|
2449
|
-
:param create_datapoint_from_text_sources_model: The body of the request.
|
|
2450
|
-
:type create_datapoint_from_text_sources_model: CreateDatapointFromTextSourcesModel
|
|
2451
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
2452
|
-
number provided, it will be total request
|
|
2453
|
-
timeout. It can also be a pair (tuple) of
|
|
2454
|
-
(connection, read) timeouts.
|
|
2455
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
2456
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
2457
|
-
request; this effectively ignores the
|
|
2458
|
-
authentication in the spec for a single request.
|
|
2459
|
-
:type _request_auth: dict, optional
|
|
2460
|
-
:param _content_type: force content-type for the request.
|
|
2461
|
-
:type _content_type: str, Optional
|
|
2462
|
-
:param _headers: set to override the headers for a single
|
|
2463
|
-
request; this effectively ignores the headers
|
|
2464
|
-
in the spec for a single request.
|
|
2465
|
-
:type _headers: dict, optional
|
|
2466
|
-
:param _host_index: set to override the host_index for a single
|
|
2467
|
-
request; this effectively ignores the host_index
|
|
2468
|
-
in the spec for a single request.
|
|
2469
|
-
:type _host_index: int, optional
|
|
2470
|
-
:return: Returns the result object.
|
|
2471
|
-
""" # noqa: E501
|
|
2472
|
-
|
|
2473
|
-
_param = self._dataset_dataset_id_datapoints_texts_post_serialize(
|
|
2474
|
-
dataset_id=dataset_id,
|
|
2475
|
-
create_datapoint_from_text_sources_model=create_datapoint_from_text_sources_model,
|
|
2476
|
-
_request_auth=_request_auth,
|
|
2477
|
-
_content_type=_content_type,
|
|
2478
|
-
_headers=_headers,
|
|
2479
|
-
_host_index=_host_index
|
|
2480
|
-
)
|
|
2481
|
-
|
|
2482
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
2483
|
-
'200': "CreateDatapointResult",
|
|
2484
|
-
}
|
|
2485
|
-
response_data = self.api_client.call_api(
|
|
2486
|
-
*_param,
|
|
2487
|
-
_request_timeout=_request_timeout
|
|
2488
|
-
)
|
|
2489
|
-
response_data.read()
|
|
2490
|
-
return self.api_client.response_deserialize(
|
|
2491
|
-
response_data=response_data,
|
|
2492
|
-
response_types_map=_response_types_map,
|
|
2493
|
-
).data
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
@validate_call
|
|
2497
|
-
def dataset_dataset_id_datapoints_texts_post_with_http_info(
|
|
2498
|
-
self,
|
|
2499
|
-
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to create the datapoint in.")],
|
|
2500
|
-
create_datapoint_from_text_sources_model: Annotated[Optional[CreateDatapointFromTextSourcesModel], Field(description="The body of the request.")] = None,
|
|
2501
|
-
_request_timeout: Union[
|
|
2502
|
-
None,
|
|
2503
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
2504
|
-
Tuple[
|
|
2505
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
2506
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
2507
|
-
]
|
|
2508
|
-
] = None,
|
|
2509
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2510
|
-
_content_type: Optional[StrictStr] = None,
|
|
2511
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2512
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2513
|
-
) -> ApiResponse[CreateDatapointResult]:
|
|
2514
|
-
"""Creates a single datapoint from text sources.
|
|
2515
|
-
|
|
2516
|
-
If multiple text sources are uploaded, a multi asset datapoint will be created.
|
|
2517
|
-
|
|
2518
|
-
:param dataset_id: The id of the dataset to create the datapoint in. (required)
|
|
2519
|
-
:type dataset_id: str
|
|
2520
|
-
:param create_datapoint_from_text_sources_model: The body of the request.
|
|
2521
|
-
:type create_datapoint_from_text_sources_model: CreateDatapointFromTextSourcesModel
|
|
2522
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
2523
|
-
number provided, it will be total request
|
|
2524
|
-
timeout. It can also be a pair (tuple) of
|
|
2525
|
-
(connection, read) timeouts.
|
|
2526
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
2527
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
2528
|
-
request; this effectively ignores the
|
|
2529
|
-
authentication in the spec for a single request.
|
|
2530
|
-
:type _request_auth: dict, optional
|
|
2531
|
-
:param _content_type: force content-type for the request.
|
|
2532
|
-
:type _content_type: str, Optional
|
|
2533
|
-
:param _headers: set to override the headers for a single
|
|
2534
|
-
request; this effectively ignores the headers
|
|
2535
|
-
in the spec for a single request.
|
|
2536
|
-
:type _headers: dict, optional
|
|
2537
|
-
:param _host_index: set to override the host_index for a single
|
|
2538
|
-
request; this effectively ignores the host_index
|
|
2539
|
-
in the spec for a single request.
|
|
2540
|
-
:type _host_index: int, optional
|
|
2541
|
-
:return: Returns the result object.
|
|
2542
|
-
""" # noqa: E501
|
|
2543
|
-
|
|
2544
|
-
_param = self._dataset_dataset_id_datapoints_texts_post_serialize(
|
|
2545
|
-
dataset_id=dataset_id,
|
|
2546
|
-
create_datapoint_from_text_sources_model=create_datapoint_from_text_sources_model,
|
|
2547
|
-
_request_auth=_request_auth,
|
|
2548
|
-
_content_type=_content_type,
|
|
2549
|
-
_headers=_headers,
|
|
2550
|
-
_host_index=_host_index
|
|
2551
|
-
)
|
|
2552
|
-
|
|
2553
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
2554
|
-
'200': "CreateDatapointResult",
|
|
2555
|
-
}
|
|
2556
|
-
response_data = self.api_client.call_api(
|
|
2557
|
-
*_param,
|
|
2558
|
-
_request_timeout=_request_timeout
|
|
2559
|
-
)
|
|
2560
|
-
response_data.read()
|
|
2561
|
-
return self.api_client.response_deserialize(
|
|
2562
|
-
response_data=response_data,
|
|
2563
|
-
response_types_map=_response_types_map,
|
|
2564
|
-
)
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
@validate_call
|
|
2568
|
-
def dataset_dataset_id_datapoints_texts_post_without_preload_content(
|
|
2569
|
-
self,
|
|
2570
|
-
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to create the datapoint in.")],
|
|
2571
|
-
create_datapoint_from_text_sources_model: Annotated[Optional[CreateDatapointFromTextSourcesModel], Field(description="The body of the request.")] = None,
|
|
2572
|
-
_request_timeout: Union[
|
|
2573
|
-
None,
|
|
2574
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
2575
|
-
Tuple[
|
|
2576
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
2577
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
2578
|
-
]
|
|
2579
|
-
] = None,
|
|
2580
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2581
|
-
_content_type: Optional[StrictStr] = None,
|
|
2582
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2583
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2584
|
-
) -> RESTResponseType:
|
|
2585
|
-
"""Creates a single datapoint from text sources.
|
|
2586
|
-
|
|
2587
|
-
If multiple text sources are uploaded, a multi asset datapoint will be created.
|
|
2588
|
-
|
|
2589
|
-
:param dataset_id: The id of the dataset to create the datapoint in. (required)
|
|
2590
|
-
:type dataset_id: str
|
|
2591
|
-
:param create_datapoint_from_text_sources_model: The body of the request.
|
|
2592
|
-
:type create_datapoint_from_text_sources_model: CreateDatapointFromTextSourcesModel
|
|
2593
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
2594
|
-
number provided, it will be total request
|
|
2595
|
-
timeout. It can also be a pair (tuple) of
|
|
2596
|
-
(connection, read) timeouts.
|
|
2597
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
2598
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
2599
|
-
request; this effectively ignores the
|
|
2600
|
-
authentication in the spec for a single request.
|
|
2601
|
-
:type _request_auth: dict, optional
|
|
2602
|
-
:param _content_type: force content-type for the request.
|
|
2603
|
-
:type _content_type: str, Optional
|
|
2604
|
-
:param _headers: set to override the headers for a single
|
|
2605
|
-
request; this effectively ignores the headers
|
|
2606
|
-
in the spec for a single request.
|
|
2607
|
-
:type _headers: dict, optional
|
|
2608
|
-
:param _host_index: set to override the host_index for a single
|
|
2609
|
-
request; this effectively ignores the host_index
|
|
2610
|
-
in the spec for a single request.
|
|
2611
|
-
:type _host_index: int, optional
|
|
2612
|
-
:return: Returns the result object.
|
|
2613
|
-
""" # noqa: E501
|
|
2614
|
-
|
|
2615
|
-
_param = self._dataset_dataset_id_datapoints_texts_post_serialize(
|
|
2616
|
-
dataset_id=dataset_id,
|
|
2617
|
-
create_datapoint_from_text_sources_model=create_datapoint_from_text_sources_model,
|
|
2618
|
-
_request_auth=_request_auth,
|
|
2619
|
-
_content_type=_content_type,
|
|
2620
|
-
_headers=_headers,
|
|
2621
|
-
_host_index=_host_index
|
|
2622
|
-
)
|
|
2623
|
-
|
|
2624
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
2625
|
-
'200': "CreateDatapointResult",
|
|
2626
|
-
}
|
|
2627
|
-
response_data = self.api_client.call_api(
|
|
2628
|
-
*_param,
|
|
2629
|
-
_request_timeout=_request_timeout
|
|
2630
|
-
)
|
|
2631
|
-
return response_data.response
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
def _dataset_dataset_id_datapoints_texts_post_serialize(
|
|
2635
|
-
self,
|
|
2636
|
-
dataset_id,
|
|
2637
|
-
create_datapoint_from_text_sources_model,
|
|
2638
|
-
_request_auth,
|
|
2639
|
-
_content_type,
|
|
2640
|
-
_headers,
|
|
2641
|
-
_host_index,
|
|
2642
|
-
) -> RequestSerialized:
|
|
2643
|
-
|
|
2644
|
-
_host = None
|
|
2645
|
-
|
|
2646
|
-
_collection_formats: Dict[str, str] = {
|
|
2647
|
-
}
|
|
2648
|
-
|
|
2649
|
-
_path_params: Dict[str, str] = {}
|
|
2650
|
-
_query_params: List[Tuple[str, str]] = []
|
|
2651
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2652
|
-
_form_params: List[Tuple[str, str]] = []
|
|
2653
|
-
_files: Dict[
|
|
2654
|
-
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2655
|
-
] = {}
|
|
2656
|
-
_body_params: Optional[bytes] = None
|
|
2657
|
-
|
|
2658
|
-
# process the path parameters
|
|
2659
|
-
if dataset_id is not None:
|
|
2660
|
-
_path_params['datasetId'] = dataset_id
|
|
2661
|
-
# process the query parameters
|
|
2662
|
-
# process the header parameters
|
|
2663
|
-
# process the form parameters
|
|
2664
|
-
# process the body parameter
|
|
2665
|
-
if create_datapoint_from_text_sources_model is not None:
|
|
2666
|
-
_body_params = create_datapoint_from_text_sources_model
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
# set the HTTP header `Accept`
|
|
2670
|
-
if 'Accept' not in _header_params:
|
|
2671
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2672
|
-
[
|
|
2673
|
-
'text/plain',
|
|
2674
|
-
'application/json',
|
|
2675
|
-
'text/json'
|
|
2676
|
-
]
|
|
2677
|
-
)
|
|
2678
|
-
|
|
2679
|
-
# set the HTTP header `Content-Type`
|
|
2680
|
-
if _content_type:
|
|
2681
|
-
_header_params['Content-Type'] = _content_type
|
|
2682
|
-
else:
|
|
2683
|
-
_default_content_type = (
|
|
2684
|
-
self.api_client.select_header_content_type(
|
|
2685
|
-
[
|
|
2686
|
-
'application/json',
|
|
2687
|
-
'text/json',
|
|
2688
|
-
'application/*+json'
|
|
2689
|
-
]
|
|
2690
|
-
)
|
|
2691
|
-
)
|
|
2692
|
-
if _default_content_type is not None:
|
|
2693
|
-
_header_params['Content-Type'] = _default_content_type
|
|
2694
|
-
|
|
2695
|
-
# authentication setting
|
|
2696
|
-
_auth_settings: List[str] = [
|
|
2697
|
-
'bearer',
|
|
2698
|
-
'oauth2'
|
|
2699
|
-
]
|
|
2700
|
-
|
|
2701
|
-
return self.api_client.param_serialize(
|
|
2702
|
-
method='POST',
|
|
2703
|
-
resource_path='/dataset/{datasetId}/datapoints/texts',
|
|
2704
|
-
path_params=_path_params,
|
|
2705
|
-
query_params=_query_params,
|
|
2706
|
-
header_params=_header_params,
|
|
2707
|
-
body=_body_params,
|
|
2708
|
-
post_params=_form_params,
|
|
2709
|
-
files=_files,
|
|
2710
|
-
auth_settings=_auth_settings,
|
|
2711
|
-
collection_formats=_collection_formats,
|
|
2712
|
-
_host=_host,
|
|
2713
|
-
_request_auth=_request_auth
|
|
2714
|
-
)
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
@validate_call
|
|
2720
|
-
def dataset_dataset_id_datapoints_urls_post(
|
|
2721
|
-
self,
|
|
2722
|
-
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to create the datapoint in.")],
|
|
2723
|
-
create_datapoint_from_urls_model: Annotated[Optional[CreateDatapointFromUrlsModel], Field(description="The body of the request.")] = None,
|
|
2724
|
-
_request_timeout: Union[
|
|
2725
|
-
None,
|
|
2726
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
2727
|
-
Tuple[
|
|
2728
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
2729
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
2730
|
-
]
|
|
2731
|
-
] = None,
|
|
2732
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2733
|
-
_content_type: Optional[StrictStr] = None,
|
|
2734
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2735
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2736
|
-
) -> CreateDatapointResult:
|
|
2737
|
-
"""Creates a single datapoint where the assets are fetched from the specified urls.
|
|
2738
|
-
|
|
2739
|
-
Passing in multiple urls will create a single datapoint with a MultiAsset. Each url will be fetched and stored as a sub-asset of the MultiAsset. <para /> If any of the urls are not accessible, the request will fail.
|
|
2740
|
-
|
|
2741
|
-
:param dataset_id: The id of the dataset to create the datapoint in. (required)
|
|
2742
|
-
:type dataset_id: str
|
|
2743
|
-
:param create_datapoint_from_urls_model: The body of the request.
|
|
2744
|
-
:type create_datapoint_from_urls_model: CreateDatapointFromUrlsModel
|
|
2745
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
2746
|
-
number provided, it will be total request
|
|
2747
|
-
timeout. It can also be a pair (tuple) of
|
|
2748
|
-
(connection, read) timeouts.
|
|
2749
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
2750
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
2751
|
-
request; this effectively ignores the
|
|
2752
|
-
authentication in the spec for a single request.
|
|
2753
|
-
:type _request_auth: dict, optional
|
|
2754
|
-
:param _content_type: force content-type for the request.
|
|
2755
|
-
:type _content_type: str, Optional
|
|
2756
|
-
:param _headers: set to override the headers for a single
|
|
2757
|
-
request; this effectively ignores the headers
|
|
2758
|
-
in the spec for a single request.
|
|
2759
|
-
:type _headers: dict, optional
|
|
2760
|
-
:param _host_index: set to override the host_index for a single
|
|
2761
|
-
request; this effectively ignores the host_index
|
|
2762
|
-
in the spec for a single request.
|
|
2763
|
-
:type _host_index: int, optional
|
|
2764
|
-
:return: Returns the result object.
|
|
2765
|
-
""" # noqa: E501
|
|
2766
|
-
|
|
2767
|
-
_param = self._dataset_dataset_id_datapoints_urls_post_serialize(
|
|
2768
|
-
dataset_id=dataset_id,
|
|
2769
|
-
create_datapoint_from_urls_model=create_datapoint_from_urls_model,
|
|
2770
|
-
_request_auth=_request_auth,
|
|
2771
|
-
_content_type=_content_type,
|
|
2772
|
-
_headers=_headers,
|
|
2773
|
-
_host_index=_host_index
|
|
2774
|
-
)
|
|
2775
|
-
|
|
2776
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
2777
|
-
'200': "CreateDatapointResult",
|
|
2778
|
-
}
|
|
2779
|
-
response_data = self.api_client.call_api(
|
|
2780
|
-
*_param,
|
|
2781
|
-
_request_timeout=_request_timeout
|
|
2782
|
-
)
|
|
2783
|
-
response_data.read()
|
|
2784
|
-
return self.api_client.response_deserialize(
|
|
2785
|
-
response_data=response_data,
|
|
2786
|
-
response_types_map=_response_types_map,
|
|
2787
|
-
).data
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
@validate_call
|
|
2791
|
-
def dataset_dataset_id_datapoints_urls_post_with_http_info(
|
|
2792
|
-
self,
|
|
2793
|
-
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to create the datapoint in.")],
|
|
2794
|
-
create_datapoint_from_urls_model: Annotated[Optional[CreateDatapointFromUrlsModel], Field(description="The body of the request.")] = None,
|
|
2795
|
-
_request_timeout: Union[
|
|
2796
|
-
None,
|
|
2797
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
2798
|
-
Tuple[
|
|
2799
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
2800
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
2801
|
-
]
|
|
2802
|
-
] = None,
|
|
2803
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2804
|
-
_content_type: Optional[StrictStr] = None,
|
|
2805
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2806
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2807
|
-
) -> ApiResponse[CreateDatapointResult]:
|
|
2808
|
-
"""Creates a single datapoint where the assets are fetched from the specified urls.
|
|
2809
|
-
|
|
2810
|
-
Passing in multiple urls will create a single datapoint with a MultiAsset. Each url will be fetched and stored as a sub-asset of the MultiAsset. <para /> If any of the urls are not accessible, the request will fail.
|
|
2811
|
-
|
|
2812
|
-
:param dataset_id: The id of the dataset to create the datapoint in. (required)
|
|
2813
|
-
:type dataset_id: str
|
|
2814
|
-
:param create_datapoint_from_urls_model: The body of the request.
|
|
2815
|
-
:type create_datapoint_from_urls_model: CreateDatapointFromUrlsModel
|
|
2816
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
2817
|
-
number provided, it will be total request
|
|
2818
|
-
timeout. It can also be a pair (tuple) of
|
|
2819
|
-
(connection, read) timeouts.
|
|
2820
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
2821
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
2822
|
-
request; this effectively ignores the
|
|
2823
|
-
authentication in the spec for a single request.
|
|
2824
|
-
:type _request_auth: dict, optional
|
|
2825
|
-
:param _content_type: force content-type for the request.
|
|
2826
|
-
:type _content_type: str, Optional
|
|
2827
|
-
:param _headers: set to override the headers for a single
|
|
2828
|
-
request; this effectively ignores the headers
|
|
2829
|
-
in the spec for a single request.
|
|
2830
|
-
:type _headers: dict, optional
|
|
2831
|
-
:param _host_index: set to override the host_index for a single
|
|
2832
|
-
request; this effectively ignores the host_index
|
|
2833
|
-
in the spec for a single request.
|
|
2834
|
-
:type _host_index: int, optional
|
|
2835
|
-
:return: Returns the result object.
|
|
2836
|
-
""" # noqa: E501
|
|
2837
|
-
|
|
2838
|
-
_param = self._dataset_dataset_id_datapoints_urls_post_serialize(
|
|
2839
|
-
dataset_id=dataset_id,
|
|
2840
|
-
create_datapoint_from_urls_model=create_datapoint_from_urls_model,
|
|
2841
|
-
_request_auth=_request_auth,
|
|
2842
|
-
_content_type=_content_type,
|
|
2843
|
-
_headers=_headers,
|
|
2844
|
-
_host_index=_host_index
|
|
2845
|
-
)
|
|
2846
|
-
|
|
2847
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
2848
|
-
'200': "CreateDatapointResult",
|
|
2849
|
-
}
|
|
2850
|
-
response_data = self.api_client.call_api(
|
|
2851
|
-
*_param,
|
|
2852
|
-
_request_timeout=_request_timeout
|
|
2853
|
-
)
|
|
2854
|
-
response_data.read()
|
|
2855
|
-
return self.api_client.response_deserialize(
|
|
2856
|
-
response_data=response_data,
|
|
2857
|
-
response_types_map=_response_types_map,
|
|
2858
|
-
)
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
@validate_call
|
|
2862
|
-
def dataset_dataset_id_datapoints_urls_post_without_preload_content(
|
|
2863
|
-
self,
|
|
2864
|
-
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to create the datapoint in.")],
|
|
2865
|
-
create_datapoint_from_urls_model: Annotated[Optional[CreateDatapointFromUrlsModel], Field(description="The body of the request.")] = None,
|
|
2866
|
-
_request_timeout: Union[
|
|
2867
|
-
None,
|
|
2868
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
2869
|
-
Tuple[
|
|
2870
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
2871
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
2872
|
-
]
|
|
2873
|
-
] = None,
|
|
2874
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2875
|
-
_content_type: Optional[StrictStr] = None,
|
|
2876
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2877
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2878
|
-
) -> RESTResponseType:
|
|
2879
|
-
"""Creates a single datapoint where the assets are fetched from the specified urls.
|
|
2880
|
-
|
|
2881
|
-
Passing in multiple urls will create a single datapoint with a MultiAsset. Each url will be fetched and stored as a sub-asset of the MultiAsset. <para /> If any of the urls are not accessible, the request will fail.
|
|
2882
|
-
|
|
2883
|
-
:param dataset_id: The id of the dataset to create the datapoint in. (required)
|
|
2884
|
-
:type dataset_id: str
|
|
2885
|
-
:param create_datapoint_from_urls_model: The body of the request.
|
|
2886
|
-
:type create_datapoint_from_urls_model: CreateDatapointFromUrlsModel
|
|
2887
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
2888
|
-
number provided, it will be total request
|
|
2889
|
-
timeout. It can also be a pair (tuple) of
|
|
2890
|
-
(connection, read) timeouts.
|
|
2891
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
2892
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
2893
|
-
request; this effectively ignores the
|
|
2894
|
-
authentication in the spec for a single request.
|
|
2895
|
-
:type _request_auth: dict, optional
|
|
2896
|
-
:param _content_type: force content-type for the request.
|
|
2897
|
-
:type _content_type: str, Optional
|
|
2898
|
-
:param _headers: set to override the headers for a single
|
|
2899
|
-
request; this effectively ignores the headers
|
|
2900
|
-
in the spec for a single request.
|
|
2901
|
-
:type _headers: dict, optional
|
|
2902
|
-
:param _host_index: set to override the host_index for a single
|
|
2903
|
-
request; this effectively ignores the host_index
|
|
2904
|
-
in the spec for a single request.
|
|
2905
|
-
:type _host_index: int, optional
|
|
2906
|
-
:return: Returns the result object.
|
|
2907
|
-
""" # noqa: E501
|
|
2908
|
-
|
|
2909
|
-
_param = self._dataset_dataset_id_datapoints_urls_post_serialize(
|
|
2910
|
-
dataset_id=dataset_id,
|
|
2911
|
-
create_datapoint_from_urls_model=create_datapoint_from_urls_model,
|
|
2912
|
-
_request_auth=_request_auth,
|
|
2913
|
-
_content_type=_content_type,
|
|
2914
|
-
_headers=_headers,
|
|
2915
|
-
_host_index=_host_index
|
|
2916
|
-
)
|
|
2917
|
-
|
|
2918
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
2919
|
-
'200': "CreateDatapointResult",
|
|
2920
|
-
}
|
|
2921
|
-
response_data = self.api_client.call_api(
|
|
2922
|
-
*_param,
|
|
2923
|
-
_request_timeout=_request_timeout
|
|
2924
|
-
)
|
|
2925
|
-
return response_data.response
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
def _dataset_dataset_id_datapoints_urls_post_serialize(
|
|
2929
|
-
self,
|
|
2930
|
-
dataset_id,
|
|
2931
|
-
create_datapoint_from_urls_model,
|
|
2932
|
-
_request_auth,
|
|
2933
|
-
_content_type,
|
|
2934
|
-
_headers,
|
|
2935
|
-
_host_index,
|
|
2936
|
-
) -> RequestSerialized:
|
|
2937
|
-
|
|
2938
|
-
_host = None
|
|
2939
|
-
|
|
2940
|
-
_collection_formats: Dict[str, str] = {
|
|
2941
|
-
}
|
|
2942
|
-
|
|
2943
|
-
_path_params: Dict[str, str] = {}
|
|
2944
|
-
_query_params: List[Tuple[str, str]] = []
|
|
2945
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2946
|
-
_form_params: List[Tuple[str, str]] = []
|
|
2947
|
-
_files: Dict[
|
|
2948
|
-
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2949
|
-
] = {}
|
|
2950
|
-
_body_params: Optional[bytes] = None
|
|
2951
|
-
|
|
2952
|
-
# process the path parameters
|
|
2953
|
-
if dataset_id is not None:
|
|
2954
|
-
_path_params['datasetId'] = dataset_id
|
|
2955
|
-
# process the query parameters
|
|
2956
|
-
# process the header parameters
|
|
2957
|
-
# process the form parameters
|
|
2958
|
-
# process the body parameter
|
|
2959
|
-
if create_datapoint_from_urls_model is not None:
|
|
2960
|
-
_body_params = create_datapoint_from_urls_model
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
# set the HTTP header `Accept`
|
|
2964
|
-
if 'Accept' not in _header_params:
|
|
2965
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2966
|
-
[
|
|
2967
|
-
'text/plain',
|
|
2968
|
-
'application/json',
|
|
2969
|
-
'text/json'
|
|
2970
|
-
]
|
|
2971
|
-
)
|
|
2972
|
-
|
|
2973
|
-
# set the HTTP header `Content-Type`
|
|
2974
|
-
if _content_type:
|
|
2975
|
-
_header_params['Content-Type'] = _content_type
|
|
2976
|
-
else:
|
|
2977
|
-
_default_content_type = (
|
|
2978
|
-
self.api_client.select_header_content_type(
|
|
2979
|
-
[
|
|
2980
|
-
'application/json',
|
|
2981
|
-
'text/json',
|
|
2982
|
-
'application/*+json'
|
|
2983
|
-
]
|
|
2984
|
-
)
|
|
2985
|
-
)
|
|
2986
|
-
if _default_content_type is not None:
|
|
2987
|
-
_header_params['Content-Type'] = _default_content_type
|
|
2988
|
-
|
|
2989
|
-
# authentication setting
|
|
2990
|
-
_auth_settings: List[str] = [
|
|
2991
|
-
'bearer',
|
|
2992
|
-
'oauth2'
|
|
2993
|
-
]
|
|
2994
|
-
|
|
2995
|
-
return self.api_client.param_serialize(
|
|
2996
|
-
method='POST',
|
|
2997
|
-
resource_path='/dataset/{datasetId}/datapoints/urls',
|
|
2998
|
-
path_params=_path_params,
|
|
2999
|
-
query_params=_query_params,
|
|
3000
|
-
header_params=_header_params,
|
|
3001
|
-
body=_body_params,
|
|
3002
|
-
post_params=_form_params,
|
|
3003
|
-
files=_files,
|
|
3004
|
-
auth_settings=_auth_settings,
|
|
3005
|
-
collection_formats=_collection_formats,
|
|
3006
|
-
_host=_host,
|
|
3007
|
-
_request_auth=_request_auth
|
|
3008
|
-
)
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
@validate_call
|
|
3014
|
-
def dataset_dataset_id_get(
|
|
3015
|
-
self,
|
|
3016
|
-
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get.")],
|
|
3017
|
-
_request_timeout: Union[
|
|
3018
|
-
None,
|
|
3019
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
3020
|
-
Tuple[
|
|
3021
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
3022
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
3023
|
-
]
|
|
3024
|
-
] = None,
|
|
3025
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3026
|
-
_content_type: Optional[StrictStr] = None,
|
|
3027
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3028
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3029
|
-
) -> GetDatasetByIdResult:
|
|
3030
|
-
"""Gets a dataset by its id.
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
:param dataset_id: The id of the dataset to get. (required)
|
|
3034
|
-
:type dataset_id: str
|
|
3035
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
3036
|
-
number provided, it will be total request
|
|
3037
|
-
timeout. It can also be a pair (tuple) of
|
|
3038
|
-
(connection, read) timeouts.
|
|
3039
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
3040
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
3041
|
-
request; this effectively ignores the
|
|
3042
|
-
authentication in the spec for a single request.
|
|
3043
|
-
:type _request_auth: dict, optional
|
|
3044
|
-
:param _content_type: force content-type for the request.
|
|
3045
|
-
:type _content_type: str, Optional
|
|
3046
|
-
:param _headers: set to override the headers for a single
|
|
3047
|
-
request; this effectively ignores the headers
|
|
3048
|
-
in the spec for a single request.
|
|
3049
|
-
:type _headers: dict, optional
|
|
3050
|
-
:param _host_index: set to override the host_index for a single
|
|
3051
|
-
request; this effectively ignores the host_index
|
|
3052
|
-
in the spec for a single request.
|
|
3053
|
-
:type _host_index: int, optional
|
|
3054
|
-
:return: Returns the result object.
|
|
3055
|
-
""" # noqa: E501
|
|
3056
|
-
|
|
3057
|
-
_param = self._dataset_dataset_id_get_serialize(
|
|
3058
|
-
dataset_id=dataset_id,
|
|
3059
|
-
_request_auth=_request_auth,
|
|
3060
|
-
_content_type=_content_type,
|
|
3061
|
-
_headers=_headers,
|
|
3062
|
-
_host_index=_host_index
|
|
3063
|
-
)
|
|
3064
|
-
|
|
3065
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
3066
|
-
'200': "GetDatasetByIdResult",
|
|
3067
|
-
}
|
|
3068
|
-
response_data = self.api_client.call_api(
|
|
3069
|
-
*_param,
|
|
3070
|
-
_request_timeout=_request_timeout
|
|
3071
|
-
)
|
|
3072
|
-
response_data.read()
|
|
3073
|
-
return self.api_client.response_deserialize(
|
|
3074
|
-
response_data=response_data,
|
|
3075
|
-
response_types_map=_response_types_map,
|
|
3076
|
-
).data
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
@validate_call
|
|
3080
|
-
def dataset_dataset_id_get_with_http_info(
|
|
3081
|
-
self,
|
|
3082
|
-
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get.")],
|
|
3083
|
-
_request_timeout: Union[
|
|
3084
|
-
None,
|
|
3085
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
3086
|
-
Tuple[
|
|
3087
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
3088
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
3089
|
-
]
|
|
3090
|
-
] = None,
|
|
3091
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
3092
|
-
_content_type: Optional[StrictStr] = None,
|
|
3093
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3094
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3095
|
-
) -> ApiResponse[GetDatasetByIdResult]:
|
|
3096
|
-
"""Gets a dataset by its id.
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
:param dataset_id: The id of the dataset to get. (required)
|
|
1312
|
+
:param dataset_id: The id of the dataset (required)
|
|
3100
1313
|
:type dataset_id: str
|
|
1314
|
+
:param prompt_asset: The prompt asset is a file that can be added to the prompt metadata of the asset.
|
|
1315
|
+
:type prompt_asset: List[bytearray]
|
|
1316
|
+
:param file: The files to upload from the local storage. Must be either images or videos.
|
|
1317
|
+
:type file: List[bytearray]
|
|
1318
|
+
:param text: The texts to upload. The length limit is set at 256 characters per text.
|
|
1319
|
+
:type text: List[str]
|
|
1320
|
+
:param url: Creates an asset from a url. The url needs to point to a publicly accessible resource. The server will download the resource and store it as an asset in the background. <remarks> Additionally, to the urls having to be publicly accessible, they need to support HTTP HEAD requests. </remarks>
|
|
1321
|
+
:type url: List[str]
|
|
1322
|
+
:param metadata: Optional metadata to attach to the datapoint.
|
|
1323
|
+
:type metadata: List[DatasetDatasetIdDatapointsPostRequestMetadataInner]
|
|
1324
|
+
:param sort_index: The index will be used to keep the datapoints in order. Useful if upload is parallelized
|
|
1325
|
+
:type sort_index: int
|
|
3101
1326
|
:param _request_timeout: timeout setting for this request. If one
|
|
3102
1327
|
number provided, it will be total request
|
|
3103
1328
|
timeout. It can also be a pair (tuple) of
|
|
@@ -3120,8 +1345,14 @@ class DatasetApi:
|
|
|
3120
1345
|
:return: Returns the result object.
|
|
3121
1346
|
""" # noqa: E501
|
|
3122
1347
|
|
|
3123
|
-
_param = self.
|
|
1348
|
+
_param = self._dataset_dataset_id_datapoints_post_serialize(
|
|
3124
1349
|
dataset_id=dataset_id,
|
|
1350
|
+
prompt_asset=prompt_asset,
|
|
1351
|
+
file=file,
|
|
1352
|
+
text=text,
|
|
1353
|
+
url=url,
|
|
1354
|
+
metadata=metadata,
|
|
1355
|
+
sort_index=sort_index,
|
|
3125
1356
|
_request_auth=_request_auth,
|
|
3126
1357
|
_content_type=_content_type,
|
|
3127
1358
|
_headers=_headers,
|
|
@@ -3129,7 +1360,7 @@ class DatasetApi:
|
|
|
3129
1360
|
)
|
|
3130
1361
|
|
|
3131
1362
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
3132
|
-
'200': "
|
|
1363
|
+
'200': "CreateDatapointResult",
|
|
3133
1364
|
}
|
|
3134
1365
|
response_data = self.api_client.call_api(
|
|
3135
1366
|
*_param,
|
|
@@ -3143,9 +1374,15 @@ class DatasetApi:
|
|
|
3143
1374
|
|
|
3144
1375
|
|
|
3145
1376
|
@validate_call
|
|
3146
|
-
def
|
|
1377
|
+
def dataset_dataset_id_datapoints_post_without_preload_content(
|
|
3147
1378
|
self,
|
|
3148
|
-
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset
|
|
1379
|
+
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset")],
|
|
1380
|
+
prompt_asset: Annotated[Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]], Field(description="The prompt asset is a file that can be added to the prompt metadata of the asset.")] = None,
|
|
1381
|
+
file: Annotated[Optional[List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]]], Field(description="The files to upload from the local storage. Must be either images or videos.")] = None,
|
|
1382
|
+
text: Annotated[Optional[List[StrictStr]], Field(description="The texts to upload. The length limit is set at 256 characters per text.")] = None,
|
|
1383
|
+
url: Annotated[Optional[List[StrictStr]], Field(description="Creates an asset from a url. The url needs to point to a publicly accessible resource. The server will download the resource and store it as an asset in the background. <remarks> Additionally, to the urls having to be publicly accessible, they need to support HTTP HEAD requests. </remarks>")] = None,
|
|
1384
|
+
metadata: Annotated[Optional[List[DatasetDatasetIdDatapointsPostRequestMetadataInner]], Field(description="Optional metadata to attach to the datapoint.")] = None,
|
|
1385
|
+
sort_index: Annotated[Optional[StrictInt], Field(description="The index will be used to keep the datapoints in order. Useful if upload is parallelized")] = None,
|
|
3149
1386
|
_request_timeout: Union[
|
|
3150
1387
|
None,
|
|
3151
1388
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -3159,11 +1396,24 @@ class DatasetApi:
|
|
|
3159
1396
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3160
1397
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3161
1398
|
) -> RESTResponseType:
|
|
3162
|
-
"""
|
|
1399
|
+
"""Creates a new datapoint from multiple possible sources.
|
|
3163
1400
|
|
|
1401
|
+
Multiple files, texts, and urls can be provided. If multiple files are provided, a multi-asset datapoint will be created, meaning that all sources provided will be stored as sub-assets of the datapoint. If multiple datapoints are desired, one should not pass in multiple files, texts, or urls, instead, one should call this endpoint multiple times with the desired file, text, or url per datapoint. The request must be a multipart form request, where each parameter is sent as a separate part. The files, texts, and urls can be mixed and matched as needed, however, at least one of them must be provided, and one should make sure that mixing them makes sense for the dataset.
|
|
3164
1402
|
|
|
3165
|
-
:param dataset_id: The id of the dataset
|
|
1403
|
+
:param dataset_id: The id of the dataset (required)
|
|
3166
1404
|
:type dataset_id: str
|
|
1405
|
+
:param prompt_asset: The prompt asset is a file that can be added to the prompt metadata of the asset.
|
|
1406
|
+
:type prompt_asset: List[bytearray]
|
|
1407
|
+
:param file: The files to upload from the local storage. Must be either images or videos.
|
|
1408
|
+
:type file: List[bytearray]
|
|
1409
|
+
:param text: The texts to upload. The length limit is set at 256 characters per text.
|
|
1410
|
+
:type text: List[str]
|
|
1411
|
+
:param url: Creates an asset from a url. The url needs to point to a publicly accessible resource. The server will download the resource and store it as an asset in the background. <remarks> Additionally, to the urls having to be publicly accessible, they need to support HTTP HEAD requests. </remarks>
|
|
1412
|
+
:type url: List[str]
|
|
1413
|
+
:param metadata: Optional metadata to attach to the datapoint.
|
|
1414
|
+
:type metadata: List[DatasetDatasetIdDatapointsPostRequestMetadataInner]
|
|
1415
|
+
:param sort_index: The index will be used to keep the datapoints in order. Useful if upload is parallelized
|
|
1416
|
+
:type sort_index: int
|
|
3167
1417
|
:param _request_timeout: timeout setting for this request. If one
|
|
3168
1418
|
number provided, it will be total request
|
|
3169
1419
|
timeout. It can also be a pair (tuple) of
|
|
@@ -3186,8 +1436,14 @@ class DatasetApi:
|
|
|
3186
1436
|
:return: Returns the result object.
|
|
3187
1437
|
""" # noqa: E501
|
|
3188
1438
|
|
|
3189
|
-
_param = self.
|
|
1439
|
+
_param = self._dataset_dataset_id_datapoints_post_serialize(
|
|
3190
1440
|
dataset_id=dataset_id,
|
|
1441
|
+
prompt_asset=prompt_asset,
|
|
1442
|
+
file=file,
|
|
1443
|
+
text=text,
|
|
1444
|
+
url=url,
|
|
1445
|
+
metadata=metadata,
|
|
1446
|
+
sort_index=sort_index,
|
|
3191
1447
|
_request_auth=_request_auth,
|
|
3192
1448
|
_content_type=_content_type,
|
|
3193
1449
|
_headers=_headers,
|
|
@@ -3195,7 +1451,7 @@ class DatasetApi:
|
|
|
3195
1451
|
)
|
|
3196
1452
|
|
|
3197
1453
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
3198
|
-
'200': "
|
|
1454
|
+
'200': "CreateDatapointResult",
|
|
3199
1455
|
}
|
|
3200
1456
|
response_data = self.api_client.call_api(
|
|
3201
1457
|
*_param,
|
|
@@ -3204,9 +1460,15 @@ class DatasetApi:
|
|
|
3204
1460
|
return response_data.response
|
|
3205
1461
|
|
|
3206
1462
|
|
|
3207
|
-
def
|
|
1463
|
+
def _dataset_dataset_id_datapoints_post_serialize(
|
|
3208
1464
|
self,
|
|
3209
1465
|
dataset_id,
|
|
1466
|
+
prompt_asset,
|
|
1467
|
+
file,
|
|
1468
|
+
text,
|
|
1469
|
+
url,
|
|
1470
|
+
metadata,
|
|
1471
|
+
sort_index,
|
|
3210
1472
|
_request_auth,
|
|
3211
1473
|
_content_type,
|
|
3212
1474
|
_headers,
|
|
@@ -3216,6 +1478,11 @@ class DatasetApi:
|
|
|
3216
1478
|
_host = None
|
|
3217
1479
|
|
|
3218
1480
|
_collection_formats: Dict[str, str] = {
|
|
1481
|
+
'promptAsset': 'csv',
|
|
1482
|
+
'file': 'csv',
|
|
1483
|
+
'text': 'multi',
|
|
1484
|
+
'url': 'multi',
|
|
1485
|
+
'metadata': 'multi',
|
|
3219
1486
|
}
|
|
3220
1487
|
|
|
3221
1488
|
_path_params: Dict[str, str] = {}
|
|
@@ -3233,6 +1500,18 @@ class DatasetApi:
|
|
|
3233
1500
|
# process the query parameters
|
|
3234
1501
|
# process the header parameters
|
|
3235
1502
|
# process the form parameters
|
|
1503
|
+
if prompt_asset is not None:
|
|
1504
|
+
_files['promptAsset'] = prompt_asset
|
|
1505
|
+
if file is not None:
|
|
1506
|
+
_files['file'] = file
|
|
1507
|
+
if text is not None:
|
|
1508
|
+
_form_params.append(('text', text))
|
|
1509
|
+
if url is not None:
|
|
1510
|
+
_form_params.append(('url', url))
|
|
1511
|
+
if metadata is not None:
|
|
1512
|
+
_form_params.append(('metadata', metadata))
|
|
1513
|
+
if sort_index is not None:
|
|
1514
|
+
_form_params.append(('sortIndex', sort_index))
|
|
3236
1515
|
# process the body parameter
|
|
3237
1516
|
|
|
3238
1517
|
|
|
@@ -3246,6 +1525,19 @@ class DatasetApi:
|
|
|
3246
1525
|
]
|
|
3247
1526
|
)
|
|
3248
1527
|
|
|
1528
|
+
# set the HTTP header `Content-Type`
|
|
1529
|
+
if _content_type:
|
|
1530
|
+
_header_params['Content-Type'] = _content_type
|
|
1531
|
+
else:
|
|
1532
|
+
_default_content_type = (
|
|
1533
|
+
self.api_client.select_header_content_type(
|
|
1534
|
+
[
|
|
1535
|
+
'multipart/form-data'
|
|
1536
|
+
]
|
|
1537
|
+
)
|
|
1538
|
+
)
|
|
1539
|
+
if _default_content_type is not None:
|
|
1540
|
+
_header_params['Content-Type'] = _default_content_type
|
|
3249
1541
|
|
|
3250
1542
|
# authentication setting
|
|
3251
1543
|
_auth_settings: List[str] = [
|
|
@@ -3254,8 +1546,8 @@ class DatasetApi:
|
|
|
3254
1546
|
]
|
|
3255
1547
|
|
|
3256
1548
|
return self.api_client.param_serialize(
|
|
3257
|
-
method='
|
|
3258
|
-
resource_path='/dataset/{datasetId}',
|
|
1549
|
+
method='POST',
|
|
1550
|
+
resource_path='/dataset/{datasetId}/datapoints',
|
|
3259
1551
|
path_params=_path_params,
|
|
3260
1552
|
query_params=_query_params,
|
|
3261
1553
|
header_params=_header_params,
|
|
@@ -3272,10 +1564,10 @@ class DatasetApi:
|
|
|
3272
1564
|
|
|
3273
1565
|
|
|
3274
1566
|
@validate_call
|
|
3275
|
-
def
|
|
1567
|
+
def dataset_dataset_id_datapoints_s3_post(
|
|
3276
1568
|
self,
|
|
3277
|
-
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to
|
|
3278
|
-
|
|
1569
|
+
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to upload the files to.")],
|
|
1570
|
+
create_datapoints_from_s3_bucket_model: Annotated[Optional[CreateDatapointsFromS3BucketModel], Field(description="The body of the request.")] = None,
|
|
3279
1571
|
_request_timeout: Union[
|
|
3280
1572
|
None,
|
|
3281
1573
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -3288,14 +1580,15 @@ class DatasetApi:
|
|
|
3288
1580
|
_content_type: Optional[StrictStr] = None,
|
|
3289
1581
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3290
1582
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3291
|
-
) ->
|
|
3292
|
-
"""
|
|
1583
|
+
) -> UploadFromS3Result:
|
|
1584
|
+
"""Uploads files from an S3 bucket to a dataset.
|
|
3293
1585
|
|
|
1586
|
+
A new datapoint will be created for each file in the bucket.
|
|
3294
1587
|
|
|
3295
|
-
:param dataset_id: The id of the dataset to
|
|
1588
|
+
:param dataset_id: The id of the dataset to upload the files to. (required)
|
|
3296
1589
|
:type dataset_id: str
|
|
3297
|
-
:param
|
|
3298
|
-
:type
|
|
1590
|
+
:param create_datapoints_from_s3_bucket_model: The body of the request.
|
|
1591
|
+
:type create_datapoints_from_s3_bucket_model: CreateDatapointsFromS3BucketModel
|
|
3299
1592
|
:param _request_timeout: timeout setting for this request. If one
|
|
3300
1593
|
number provided, it will be total request
|
|
3301
1594
|
timeout. It can also be a pair (tuple) of
|
|
@@ -3318,9 +1611,9 @@ class DatasetApi:
|
|
|
3318
1611
|
:return: Returns the result object.
|
|
3319
1612
|
""" # noqa: E501
|
|
3320
1613
|
|
|
3321
|
-
_param = self.
|
|
1614
|
+
_param = self._dataset_dataset_id_datapoints_s3_post_serialize(
|
|
3322
1615
|
dataset_id=dataset_id,
|
|
3323
|
-
|
|
1616
|
+
create_datapoints_from_s3_bucket_model=create_datapoints_from_s3_bucket_model,
|
|
3324
1617
|
_request_auth=_request_auth,
|
|
3325
1618
|
_content_type=_content_type,
|
|
3326
1619
|
_headers=_headers,
|
|
@@ -3328,7 +1621,7 @@ class DatasetApi:
|
|
|
3328
1621
|
)
|
|
3329
1622
|
|
|
3330
1623
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
3331
|
-
'
|
|
1624
|
+
'200': "UploadFromS3Result",
|
|
3332
1625
|
}
|
|
3333
1626
|
response_data = self.api_client.call_api(
|
|
3334
1627
|
*_param,
|
|
@@ -3342,10 +1635,10 @@ class DatasetApi:
|
|
|
3342
1635
|
|
|
3343
1636
|
|
|
3344
1637
|
@validate_call
|
|
3345
|
-
def
|
|
1638
|
+
def dataset_dataset_id_datapoints_s3_post_with_http_info(
|
|
3346
1639
|
self,
|
|
3347
|
-
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to
|
|
3348
|
-
|
|
1640
|
+
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to upload the files to.")],
|
|
1641
|
+
create_datapoints_from_s3_bucket_model: Annotated[Optional[CreateDatapointsFromS3BucketModel], Field(description="The body of the request.")] = None,
|
|
3349
1642
|
_request_timeout: Union[
|
|
3350
1643
|
None,
|
|
3351
1644
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -3358,14 +1651,15 @@ class DatasetApi:
|
|
|
3358
1651
|
_content_type: Optional[StrictStr] = None,
|
|
3359
1652
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3360
1653
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3361
|
-
) -> ApiResponse[
|
|
3362
|
-
"""
|
|
1654
|
+
) -> ApiResponse[UploadFromS3Result]:
|
|
1655
|
+
"""Uploads files from an S3 bucket to a dataset.
|
|
3363
1656
|
|
|
1657
|
+
A new datapoint will be created for each file in the bucket.
|
|
3364
1658
|
|
|
3365
|
-
:param dataset_id: The id of the dataset to
|
|
1659
|
+
:param dataset_id: The id of the dataset to upload the files to. (required)
|
|
3366
1660
|
:type dataset_id: str
|
|
3367
|
-
:param
|
|
3368
|
-
:type
|
|
1661
|
+
:param create_datapoints_from_s3_bucket_model: The body of the request.
|
|
1662
|
+
:type create_datapoints_from_s3_bucket_model: CreateDatapointsFromS3BucketModel
|
|
3369
1663
|
:param _request_timeout: timeout setting for this request. If one
|
|
3370
1664
|
number provided, it will be total request
|
|
3371
1665
|
timeout. It can also be a pair (tuple) of
|
|
@@ -3388,9 +1682,9 @@ class DatasetApi:
|
|
|
3388
1682
|
:return: Returns the result object.
|
|
3389
1683
|
""" # noqa: E501
|
|
3390
1684
|
|
|
3391
|
-
_param = self.
|
|
1685
|
+
_param = self._dataset_dataset_id_datapoints_s3_post_serialize(
|
|
3392
1686
|
dataset_id=dataset_id,
|
|
3393
|
-
|
|
1687
|
+
create_datapoints_from_s3_bucket_model=create_datapoints_from_s3_bucket_model,
|
|
3394
1688
|
_request_auth=_request_auth,
|
|
3395
1689
|
_content_type=_content_type,
|
|
3396
1690
|
_headers=_headers,
|
|
@@ -3398,7 +1692,7 @@ class DatasetApi:
|
|
|
3398
1692
|
)
|
|
3399
1693
|
|
|
3400
1694
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
3401
|
-
'
|
|
1695
|
+
'200': "UploadFromS3Result",
|
|
3402
1696
|
}
|
|
3403
1697
|
response_data = self.api_client.call_api(
|
|
3404
1698
|
*_param,
|
|
@@ -3412,10 +1706,10 @@ class DatasetApi:
|
|
|
3412
1706
|
|
|
3413
1707
|
|
|
3414
1708
|
@validate_call
|
|
3415
|
-
def
|
|
1709
|
+
def dataset_dataset_id_datapoints_s3_post_without_preload_content(
|
|
3416
1710
|
self,
|
|
3417
|
-
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to
|
|
3418
|
-
|
|
1711
|
+
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to upload the files to.")],
|
|
1712
|
+
create_datapoints_from_s3_bucket_model: Annotated[Optional[CreateDatapointsFromS3BucketModel], Field(description="The body of the request.")] = None,
|
|
3419
1713
|
_request_timeout: Union[
|
|
3420
1714
|
None,
|
|
3421
1715
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -3429,13 +1723,14 @@ class DatasetApi:
|
|
|
3429
1723
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3430
1724
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3431
1725
|
) -> RESTResponseType:
|
|
3432
|
-
"""
|
|
1726
|
+
"""Uploads files from an S3 bucket to a dataset.
|
|
3433
1727
|
|
|
1728
|
+
A new datapoint will be created for each file in the bucket.
|
|
3434
1729
|
|
|
3435
|
-
:param dataset_id: The id of the dataset to
|
|
1730
|
+
:param dataset_id: The id of the dataset to upload the files to. (required)
|
|
3436
1731
|
:type dataset_id: str
|
|
3437
|
-
:param
|
|
3438
|
-
:type
|
|
1732
|
+
:param create_datapoints_from_s3_bucket_model: The body of the request.
|
|
1733
|
+
:type create_datapoints_from_s3_bucket_model: CreateDatapointsFromS3BucketModel
|
|
3439
1734
|
:param _request_timeout: timeout setting for this request. If one
|
|
3440
1735
|
number provided, it will be total request
|
|
3441
1736
|
timeout. It can also be a pair (tuple) of
|
|
@@ -3458,9 +1753,9 @@ class DatasetApi:
|
|
|
3458
1753
|
:return: Returns the result object.
|
|
3459
1754
|
""" # noqa: E501
|
|
3460
1755
|
|
|
3461
|
-
_param = self.
|
|
1756
|
+
_param = self._dataset_dataset_id_datapoints_s3_post_serialize(
|
|
3462
1757
|
dataset_id=dataset_id,
|
|
3463
|
-
|
|
1758
|
+
create_datapoints_from_s3_bucket_model=create_datapoints_from_s3_bucket_model,
|
|
3464
1759
|
_request_auth=_request_auth,
|
|
3465
1760
|
_content_type=_content_type,
|
|
3466
1761
|
_headers=_headers,
|
|
@@ -3468,7 +1763,7 @@ class DatasetApi:
|
|
|
3468
1763
|
)
|
|
3469
1764
|
|
|
3470
1765
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
3471
|
-
'
|
|
1766
|
+
'200': "UploadFromS3Result",
|
|
3472
1767
|
}
|
|
3473
1768
|
response_data = self.api_client.call_api(
|
|
3474
1769
|
*_param,
|
|
@@ -3477,10 +1772,10 @@ class DatasetApi:
|
|
|
3477
1772
|
return response_data.response
|
|
3478
1773
|
|
|
3479
1774
|
|
|
3480
|
-
def
|
|
1775
|
+
def _dataset_dataset_id_datapoints_s3_post_serialize(
|
|
3481
1776
|
self,
|
|
3482
1777
|
dataset_id,
|
|
3483
|
-
|
|
1778
|
+
create_datapoints_from_s3_bucket_model,
|
|
3484
1779
|
_request_auth,
|
|
3485
1780
|
_content_type,
|
|
3486
1781
|
_headers,
|
|
@@ -3508,10 +1803,19 @@ class DatasetApi:
|
|
|
3508
1803
|
# process the header parameters
|
|
3509
1804
|
# process the form parameters
|
|
3510
1805
|
# process the body parameter
|
|
3511
|
-
if
|
|
3512
|
-
_body_params =
|
|
1806
|
+
if create_datapoints_from_s3_bucket_model is not None:
|
|
1807
|
+
_body_params = create_datapoints_from_s3_bucket_model
|
|
3513
1808
|
|
|
3514
1809
|
|
|
1810
|
+
# set the HTTP header `Accept`
|
|
1811
|
+
if 'Accept' not in _header_params:
|
|
1812
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1813
|
+
[
|
|
1814
|
+
'text/plain',
|
|
1815
|
+
'application/json',
|
|
1816
|
+
'text/json'
|
|
1817
|
+
]
|
|
1818
|
+
)
|
|
3515
1819
|
|
|
3516
1820
|
# set the HTTP header `Content-Type`
|
|
3517
1821
|
if _content_type:
|
|
@@ -3536,8 +1840,8 @@ class DatasetApi:
|
|
|
3536
1840
|
]
|
|
3537
1841
|
|
|
3538
1842
|
return self.api_client.param_serialize(
|
|
3539
|
-
method='
|
|
3540
|
-
resource_path='/dataset/{datasetId}/
|
|
1843
|
+
method='POST',
|
|
1844
|
+
resource_path='/dataset/{datasetId}/datapoints/s3',
|
|
3541
1845
|
path_params=_path_params,
|
|
3542
1846
|
query_params=_query_params,
|
|
3543
1847
|
header_params=_header_params,
|
|
@@ -3554,9 +1858,10 @@ class DatasetApi:
|
|
|
3554
1858
|
|
|
3555
1859
|
|
|
3556
1860
|
@validate_call
|
|
3557
|
-
def
|
|
1861
|
+
def dataset_dataset_id_datapoints_texts_post(
|
|
3558
1862
|
self,
|
|
3559
|
-
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to
|
|
1863
|
+
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to create the datapoint in.")],
|
|
1864
|
+
create_datapoint_from_text_sources_model: Annotated[Optional[CreateDatapointFromTextSourcesModel], Field(description="The body of the request.")] = None,
|
|
3560
1865
|
_request_timeout: Union[
|
|
3561
1866
|
None,
|
|
3562
1867
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -3569,12 +1874,15 @@ class DatasetApi:
|
|
|
3569
1874
|
_content_type: Optional[StrictStr] = None,
|
|
3570
1875
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3571
1876
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3572
|
-
) ->
|
|
3573
|
-
"""
|
|
1877
|
+
) -> CreateDatapointResult:
|
|
1878
|
+
"""Creates a single datapoint from text sources.
|
|
3574
1879
|
|
|
1880
|
+
If multiple text sources are uploaded, a multi asset datapoint will be created.
|
|
3575
1881
|
|
|
3576
|
-
:param dataset_id: The id of the dataset to
|
|
1882
|
+
:param dataset_id: The id of the dataset to create the datapoint in. (required)
|
|
3577
1883
|
:type dataset_id: str
|
|
1884
|
+
:param create_datapoint_from_text_sources_model: The body of the request.
|
|
1885
|
+
:type create_datapoint_from_text_sources_model: CreateDatapointFromTextSourcesModel
|
|
3578
1886
|
:param _request_timeout: timeout setting for this request. If one
|
|
3579
1887
|
number provided, it will be total request
|
|
3580
1888
|
timeout. It can also be a pair (tuple) of
|
|
@@ -3597,8 +1905,9 @@ class DatasetApi:
|
|
|
3597
1905
|
:return: Returns the result object.
|
|
3598
1906
|
""" # noqa: E501
|
|
3599
1907
|
|
|
3600
|
-
_param = self.
|
|
1908
|
+
_param = self._dataset_dataset_id_datapoints_texts_post_serialize(
|
|
3601
1909
|
dataset_id=dataset_id,
|
|
1910
|
+
create_datapoint_from_text_sources_model=create_datapoint_from_text_sources_model,
|
|
3602
1911
|
_request_auth=_request_auth,
|
|
3603
1912
|
_content_type=_content_type,
|
|
3604
1913
|
_headers=_headers,
|
|
@@ -3606,7 +1915,7 @@ class DatasetApi:
|
|
|
3606
1915
|
)
|
|
3607
1916
|
|
|
3608
1917
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
3609
|
-
'200': "
|
|
1918
|
+
'200': "CreateDatapointResult",
|
|
3610
1919
|
}
|
|
3611
1920
|
response_data = self.api_client.call_api(
|
|
3612
1921
|
*_param,
|
|
@@ -3620,9 +1929,10 @@ class DatasetApi:
|
|
|
3620
1929
|
|
|
3621
1930
|
|
|
3622
1931
|
@validate_call
|
|
3623
|
-
def
|
|
1932
|
+
def dataset_dataset_id_datapoints_texts_post_with_http_info(
|
|
3624
1933
|
self,
|
|
3625
|
-
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to
|
|
1934
|
+
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to create the datapoint in.")],
|
|
1935
|
+
create_datapoint_from_text_sources_model: Annotated[Optional[CreateDatapointFromTextSourcesModel], Field(description="The body of the request.")] = None,
|
|
3626
1936
|
_request_timeout: Union[
|
|
3627
1937
|
None,
|
|
3628
1938
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -3635,12 +1945,15 @@ class DatasetApi:
|
|
|
3635
1945
|
_content_type: Optional[StrictStr] = None,
|
|
3636
1946
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3637
1947
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3638
|
-
) -> ApiResponse[
|
|
3639
|
-
"""
|
|
1948
|
+
) -> ApiResponse[CreateDatapointResult]:
|
|
1949
|
+
"""Creates a single datapoint from text sources.
|
|
3640
1950
|
|
|
1951
|
+
If multiple text sources are uploaded, a multi asset datapoint will be created.
|
|
3641
1952
|
|
|
3642
|
-
:param dataset_id: The id of the dataset to
|
|
1953
|
+
:param dataset_id: The id of the dataset to create the datapoint in. (required)
|
|
3643
1954
|
:type dataset_id: str
|
|
1955
|
+
:param create_datapoint_from_text_sources_model: The body of the request.
|
|
1956
|
+
:type create_datapoint_from_text_sources_model: CreateDatapointFromTextSourcesModel
|
|
3644
1957
|
:param _request_timeout: timeout setting for this request. If one
|
|
3645
1958
|
number provided, it will be total request
|
|
3646
1959
|
timeout. It can also be a pair (tuple) of
|
|
@@ -3663,8 +1976,9 @@ class DatasetApi:
|
|
|
3663
1976
|
:return: Returns the result object.
|
|
3664
1977
|
""" # noqa: E501
|
|
3665
1978
|
|
|
3666
|
-
_param = self.
|
|
1979
|
+
_param = self._dataset_dataset_id_datapoints_texts_post_serialize(
|
|
3667
1980
|
dataset_id=dataset_id,
|
|
1981
|
+
create_datapoint_from_text_sources_model=create_datapoint_from_text_sources_model,
|
|
3668
1982
|
_request_auth=_request_auth,
|
|
3669
1983
|
_content_type=_content_type,
|
|
3670
1984
|
_headers=_headers,
|
|
@@ -3672,7 +1986,7 @@ class DatasetApi:
|
|
|
3672
1986
|
)
|
|
3673
1987
|
|
|
3674
1988
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
3675
|
-
'200': "
|
|
1989
|
+
'200': "CreateDatapointResult",
|
|
3676
1990
|
}
|
|
3677
1991
|
response_data = self.api_client.call_api(
|
|
3678
1992
|
*_param,
|
|
@@ -3686,9 +2000,10 @@ class DatasetApi:
|
|
|
3686
2000
|
|
|
3687
2001
|
|
|
3688
2002
|
@validate_call
|
|
3689
|
-
def
|
|
2003
|
+
def dataset_dataset_id_datapoints_texts_post_without_preload_content(
|
|
3690
2004
|
self,
|
|
3691
|
-
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to
|
|
2005
|
+
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to create the datapoint in.")],
|
|
2006
|
+
create_datapoint_from_text_sources_model: Annotated[Optional[CreateDatapointFromTextSourcesModel], Field(description="The body of the request.")] = None,
|
|
3692
2007
|
_request_timeout: Union[
|
|
3693
2008
|
None,
|
|
3694
2009
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -3702,11 +2017,14 @@ class DatasetApi:
|
|
|
3702
2017
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3703
2018
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3704
2019
|
) -> RESTResponseType:
|
|
3705
|
-
"""
|
|
2020
|
+
"""Creates a single datapoint from text sources.
|
|
3706
2021
|
|
|
2022
|
+
If multiple text sources are uploaded, a multi asset datapoint will be created.
|
|
3707
2023
|
|
|
3708
|
-
:param dataset_id: The id of the dataset to
|
|
2024
|
+
:param dataset_id: The id of the dataset to create the datapoint in. (required)
|
|
3709
2025
|
:type dataset_id: str
|
|
2026
|
+
:param create_datapoint_from_text_sources_model: The body of the request.
|
|
2027
|
+
:type create_datapoint_from_text_sources_model: CreateDatapointFromTextSourcesModel
|
|
3710
2028
|
:param _request_timeout: timeout setting for this request. If one
|
|
3711
2029
|
number provided, it will be total request
|
|
3712
2030
|
timeout. It can also be a pair (tuple) of
|
|
@@ -3729,8 +2047,9 @@ class DatasetApi:
|
|
|
3729
2047
|
:return: Returns the result object.
|
|
3730
2048
|
""" # noqa: E501
|
|
3731
2049
|
|
|
3732
|
-
_param = self.
|
|
2050
|
+
_param = self._dataset_dataset_id_datapoints_texts_post_serialize(
|
|
3733
2051
|
dataset_id=dataset_id,
|
|
2052
|
+
create_datapoint_from_text_sources_model=create_datapoint_from_text_sources_model,
|
|
3734
2053
|
_request_auth=_request_auth,
|
|
3735
2054
|
_content_type=_content_type,
|
|
3736
2055
|
_headers=_headers,
|
|
@@ -3738,7 +2057,7 @@ class DatasetApi:
|
|
|
3738
2057
|
)
|
|
3739
2058
|
|
|
3740
2059
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
3741
|
-
'200': "
|
|
2060
|
+
'200': "CreateDatapointResult",
|
|
3742
2061
|
}
|
|
3743
2062
|
response_data = self.api_client.call_api(
|
|
3744
2063
|
*_param,
|
|
@@ -3747,9 +2066,10 @@ class DatasetApi:
|
|
|
3747
2066
|
return response_data.response
|
|
3748
2067
|
|
|
3749
2068
|
|
|
3750
|
-
def
|
|
2069
|
+
def _dataset_dataset_id_datapoints_texts_post_serialize(
|
|
3751
2070
|
self,
|
|
3752
2071
|
dataset_id,
|
|
2072
|
+
create_datapoint_from_text_sources_model,
|
|
3753
2073
|
_request_auth,
|
|
3754
2074
|
_content_type,
|
|
3755
2075
|
_headers,
|
|
@@ -3777,6 +2097,8 @@ class DatasetApi:
|
|
|
3777
2097
|
# process the header parameters
|
|
3778
2098
|
# process the form parameters
|
|
3779
2099
|
# process the body parameter
|
|
2100
|
+
if create_datapoint_from_text_sources_model is not None:
|
|
2101
|
+
_body_params = create_datapoint_from_text_sources_model
|
|
3780
2102
|
|
|
3781
2103
|
|
|
3782
2104
|
# set the HTTP header `Accept`
|
|
@@ -3789,6 +2111,21 @@ class DatasetApi:
|
|
|
3789
2111
|
]
|
|
3790
2112
|
)
|
|
3791
2113
|
|
|
2114
|
+
# set the HTTP header `Content-Type`
|
|
2115
|
+
if _content_type:
|
|
2116
|
+
_header_params['Content-Type'] = _content_type
|
|
2117
|
+
else:
|
|
2118
|
+
_default_content_type = (
|
|
2119
|
+
self.api_client.select_header_content_type(
|
|
2120
|
+
[
|
|
2121
|
+
'application/json',
|
|
2122
|
+
'text/json',
|
|
2123
|
+
'application/*+json'
|
|
2124
|
+
]
|
|
2125
|
+
)
|
|
2126
|
+
)
|
|
2127
|
+
if _default_content_type is not None:
|
|
2128
|
+
_header_params['Content-Type'] = _default_content_type
|
|
3792
2129
|
|
|
3793
2130
|
# authentication setting
|
|
3794
2131
|
_auth_settings: List[str] = [
|
|
@@ -3797,8 +2134,8 @@ class DatasetApi:
|
|
|
3797
2134
|
]
|
|
3798
2135
|
|
|
3799
2136
|
return self.api_client.param_serialize(
|
|
3800
|
-
method='
|
|
3801
|
-
resource_path='/dataset/{datasetId}/
|
|
2137
|
+
method='POST',
|
|
2138
|
+
resource_path='/dataset/{datasetId}/datapoints/texts',
|
|
3802
2139
|
path_params=_path_params,
|
|
3803
2140
|
query_params=_query_params,
|
|
3804
2141
|
header_params=_header_params,
|
|
@@ -3815,9 +2152,10 @@ class DatasetApi:
|
|
|
3815
2152
|
|
|
3816
2153
|
|
|
3817
2154
|
@validate_call
|
|
3818
|
-
def
|
|
2155
|
+
def dataset_dataset_id_datapoints_urls_post(
|
|
3819
2156
|
self,
|
|
3820
|
-
|
|
2157
|
+
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to create the datapoint in.")],
|
|
2158
|
+
create_datapoint_from_urls_model: Annotated[Optional[CreateDatapointFromUrlsModel], Field(description="The body of the request.")] = None,
|
|
3821
2159
|
_request_timeout: Union[
|
|
3822
2160
|
None,
|
|
3823
2161
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -3830,12 +2168,15 @@ class DatasetApi:
|
|
|
3830
2168
|
_content_type: Optional[StrictStr] = None,
|
|
3831
2169
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3832
2170
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3833
|
-
) ->
|
|
3834
|
-
"""
|
|
2171
|
+
) -> CreateDatapointResult:
|
|
2172
|
+
"""Creates a single datapoint where the assets are fetched from the specified urls.
|
|
3835
2173
|
|
|
2174
|
+
Passing in multiple urls will create a single datapoint with a MultiAsset. Each url will be fetched and stored as a sub-asset of the MultiAsset. <para /> If any of the urls are not accessible, the request will fail.
|
|
3836
2175
|
|
|
3837
|
-
:param
|
|
3838
|
-
:type
|
|
2176
|
+
:param dataset_id: The id of the dataset to create the datapoint in. (required)
|
|
2177
|
+
:type dataset_id: str
|
|
2178
|
+
:param create_datapoint_from_urls_model: The body of the request.
|
|
2179
|
+
:type create_datapoint_from_urls_model: CreateDatapointFromUrlsModel
|
|
3839
2180
|
:param _request_timeout: timeout setting for this request. If one
|
|
3840
2181
|
number provided, it will be total request
|
|
3841
2182
|
timeout. It can also be a pair (tuple) of
|
|
@@ -3857,10 +2198,10 @@ class DatasetApi:
|
|
|
3857
2198
|
:type _host_index: int, optional
|
|
3858
2199
|
:return: Returns the result object.
|
|
3859
2200
|
""" # noqa: E501
|
|
3860
|
-
warnings.warn("GET /dataset/getbyid is deprecated.", DeprecationWarning)
|
|
3861
2201
|
|
|
3862
|
-
_param = self.
|
|
3863
|
-
|
|
2202
|
+
_param = self._dataset_dataset_id_datapoints_urls_post_serialize(
|
|
2203
|
+
dataset_id=dataset_id,
|
|
2204
|
+
create_datapoint_from_urls_model=create_datapoint_from_urls_model,
|
|
3864
2205
|
_request_auth=_request_auth,
|
|
3865
2206
|
_content_type=_content_type,
|
|
3866
2207
|
_headers=_headers,
|
|
@@ -3868,7 +2209,7 @@ class DatasetApi:
|
|
|
3868
2209
|
)
|
|
3869
2210
|
|
|
3870
2211
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
3871
|
-
'200': "
|
|
2212
|
+
'200': "CreateDatapointResult",
|
|
3872
2213
|
}
|
|
3873
2214
|
response_data = self.api_client.call_api(
|
|
3874
2215
|
*_param,
|
|
@@ -3882,9 +2223,10 @@ class DatasetApi:
|
|
|
3882
2223
|
|
|
3883
2224
|
|
|
3884
2225
|
@validate_call
|
|
3885
|
-
def
|
|
2226
|
+
def dataset_dataset_id_datapoints_urls_post_with_http_info(
|
|
3886
2227
|
self,
|
|
3887
|
-
|
|
2228
|
+
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to create the datapoint in.")],
|
|
2229
|
+
create_datapoint_from_urls_model: Annotated[Optional[CreateDatapointFromUrlsModel], Field(description="The body of the request.")] = None,
|
|
3888
2230
|
_request_timeout: Union[
|
|
3889
2231
|
None,
|
|
3890
2232
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -3897,12 +2239,15 @@ class DatasetApi:
|
|
|
3897
2239
|
_content_type: Optional[StrictStr] = None,
|
|
3898
2240
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3899
2241
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3900
|
-
) -> ApiResponse[
|
|
3901
|
-
"""
|
|
2242
|
+
) -> ApiResponse[CreateDatapointResult]:
|
|
2243
|
+
"""Creates a single datapoint where the assets are fetched from the specified urls.
|
|
3902
2244
|
|
|
2245
|
+
Passing in multiple urls will create a single datapoint with a MultiAsset. Each url will be fetched and stored as a sub-asset of the MultiAsset. <para /> If any of the urls are not accessible, the request will fail.
|
|
3903
2246
|
|
|
3904
|
-
:param
|
|
3905
|
-
:type
|
|
2247
|
+
:param dataset_id: The id of the dataset to create the datapoint in. (required)
|
|
2248
|
+
:type dataset_id: str
|
|
2249
|
+
:param create_datapoint_from_urls_model: The body of the request.
|
|
2250
|
+
:type create_datapoint_from_urls_model: CreateDatapointFromUrlsModel
|
|
3906
2251
|
:param _request_timeout: timeout setting for this request. If one
|
|
3907
2252
|
number provided, it will be total request
|
|
3908
2253
|
timeout. It can also be a pair (tuple) of
|
|
@@ -3924,10 +2269,10 @@ class DatasetApi:
|
|
|
3924
2269
|
:type _host_index: int, optional
|
|
3925
2270
|
:return: Returns the result object.
|
|
3926
2271
|
""" # noqa: E501
|
|
3927
|
-
warnings.warn("GET /dataset/getbyid is deprecated.", DeprecationWarning)
|
|
3928
2272
|
|
|
3929
|
-
_param = self.
|
|
3930
|
-
|
|
2273
|
+
_param = self._dataset_dataset_id_datapoints_urls_post_serialize(
|
|
2274
|
+
dataset_id=dataset_id,
|
|
2275
|
+
create_datapoint_from_urls_model=create_datapoint_from_urls_model,
|
|
3931
2276
|
_request_auth=_request_auth,
|
|
3932
2277
|
_content_type=_content_type,
|
|
3933
2278
|
_headers=_headers,
|
|
@@ -3935,7 +2280,7 @@ class DatasetApi:
|
|
|
3935
2280
|
)
|
|
3936
2281
|
|
|
3937
2282
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
3938
|
-
'200': "
|
|
2283
|
+
'200': "CreateDatapointResult",
|
|
3939
2284
|
}
|
|
3940
2285
|
response_data = self.api_client.call_api(
|
|
3941
2286
|
*_param,
|
|
@@ -3949,9 +2294,10 @@ class DatasetApi:
|
|
|
3949
2294
|
|
|
3950
2295
|
|
|
3951
2296
|
@validate_call
|
|
3952
|
-
def
|
|
2297
|
+
def dataset_dataset_id_datapoints_urls_post_without_preload_content(
|
|
3953
2298
|
self,
|
|
3954
|
-
|
|
2299
|
+
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to create the datapoint in.")],
|
|
2300
|
+
create_datapoint_from_urls_model: Annotated[Optional[CreateDatapointFromUrlsModel], Field(description="The body of the request.")] = None,
|
|
3955
2301
|
_request_timeout: Union[
|
|
3956
2302
|
None,
|
|
3957
2303
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -3965,11 +2311,14 @@ class DatasetApi:
|
|
|
3965
2311
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
3966
2312
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
3967
2313
|
) -> RESTResponseType:
|
|
3968
|
-
"""
|
|
2314
|
+
"""Creates a single datapoint where the assets are fetched from the specified urls.
|
|
3969
2315
|
|
|
2316
|
+
Passing in multiple urls will create a single datapoint with a MultiAsset. Each url will be fetched and stored as a sub-asset of the MultiAsset. <para /> If any of the urls are not accessible, the request will fail.
|
|
3970
2317
|
|
|
3971
|
-
:param
|
|
3972
|
-
:type
|
|
2318
|
+
:param dataset_id: The id of the dataset to create the datapoint in. (required)
|
|
2319
|
+
:type dataset_id: str
|
|
2320
|
+
:param create_datapoint_from_urls_model: The body of the request.
|
|
2321
|
+
:type create_datapoint_from_urls_model: CreateDatapointFromUrlsModel
|
|
3973
2322
|
:param _request_timeout: timeout setting for this request. If one
|
|
3974
2323
|
number provided, it will be total request
|
|
3975
2324
|
timeout. It can also be a pair (tuple) of
|
|
@@ -3991,10 +2340,10 @@ class DatasetApi:
|
|
|
3991
2340
|
:type _host_index: int, optional
|
|
3992
2341
|
:return: Returns the result object.
|
|
3993
2342
|
""" # noqa: E501
|
|
3994
|
-
warnings.warn("GET /dataset/getbyid is deprecated.", DeprecationWarning)
|
|
3995
2343
|
|
|
3996
|
-
_param = self.
|
|
3997
|
-
|
|
2344
|
+
_param = self._dataset_dataset_id_datapoints_urls_post_serialize(
|
|
2345
|
+
dataset_id=dataset_id,
|
|
2346
|
+
create_datapoint_from_urls_model=create_datapoint_from_urls_model,
|
|
3998
2347
|
_request_auth=_request_auth,
|
|
3999
2348
|
_content_type=_content_type,
|
|
4000
2349
|
_headers=_headers,
|
|
@@ -4002,7 +2351,7 @@ class DatasetApi:
|
|
|
4002
2351
|
)
|
|
4003
2352
|
|
|
4004
2353
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
4005
|
-
'200': "
|
|
2354
|
+
'200': "CreateDatapointResult",
|
|
4006
2355
|
}
|
|
4007
2356
|
response_data = self.api_client.call_api(
|
|
4008
2357
|
*_param,
|
|
@@ -4011,9 +2360,10 @@ class DatasetApi:
|
|
|
4011
2360
|
return response_data.response
|
|
4012
2361
|
|
|
4013
2362
|
|
|
4014
|
-
def
|
|
2363
|
+
def _dataset_dataset_id_datapoints_urls_post_serialize(
|
|
4015
2364
|
self,
|
|
4016
|
-
|
|
2365
|
+
dataset_id,
|
|
2366
|
+
create_datapoint_from_urls_model,
|
|
4017
2367
|
_request_auth,
|
|
4018
2368
|
_content_type,
|
|
4019
2369
|
_headers,
|
|
@@ -4035,14 +2385,14 @@ class DatasetApi:
|
|
|
4035
2385
|
_body_params: Optional[bytes] = None
|
|
4036
2386
|
|
|
4037
2387
|
# process the path parameters
|
|
2388
|
+
if dataset_id is not None:
|
|
2389
|
+
_path_params['datasetId'] = dataset_id
|
|
4038
2390
|
# process the query parameters
|
|
4039
|
-
if id is not None:
|
|
4040
|
-
|
|
4041
|
-
_query_params.append(('id', id))
|
|
4042
|
-
|
|
4043
2391
|
# process the header parameters
|
|
4044
2392
|
# process the form parameters
|
|
4045
2393
|
# process the body parameter
|
|
2394
|
+
if create_datapoint_from_urls_model is not None:
|
|
2395
|
+
_body_params = create_datapoint_from_urls_model
|
|
4046
2396
|
|
|
4047
2397
|
|
|
4048
2398
|
# set the HTTP header `Accept`
|
|
@@ -4055,6 +2405,21 @@ class DatasetApi:
|
|
|
4055
2405
|
]
|
|
4056
2406
|
)
|
|
4057
2407
|
|
|
2408
|
+
# set the HTTP header `Content-Type`
|
|
2409
|
+
if _content_type:
|
|
2410
|
+
_header_params['Content-Type'] = _content_type
|
|
2411
|
+
else:
|
|
2412
|
+
_default_content_type = (
|
|
2413
|
+
self.api_client.select_header_content_type(
|
|
2414
|
+
[
|
|
2415
|
+
'application/json',
|
|
2416
|
+
'text/json',
|
|
2417
|
+
'application/*+json'
|
|
2418
|
+
]
|
|
2419
|
+
)
|
|
2420
|
+
)
|
|
2421
|
+
if _default_content_type is not None:
|
|
2422
|
+
_header_params['Content-Type'] = _default_content_type
|
|
4058
2423
|
|
|
4059
2424
|
# authentication setting
|
|
4060
2425
|
_auth_settings: List[str] = [
|
|
@@ -4063,8 +2428,8 @@ class DatasetApi:
|
|
|
4063
2428
|
]
|
|
4064
2429
|
|
|
4065
2430
|
return self.api_client.param_serialize(
|
|
4066
|
-
method='
|
|
4067
|
-
resource_path='/dataset/
|
|
2431
|
+
method='POST',
|
|
2432
|
+
resource_path='/dataset/{datasetId}/datapoints/urls',
|
|
4068
2433
|
path_params=_path_params,
|
|
4069
2434
|
query_params=_query_params,
|
|
4070
2435
|
header_params=_header_params,
|
|
@@ -4081,10 +2446,9 @@ class DatasetApi:
|
|
|
4081
2446
|
|
|
4082
2447
|
|
|
4083
2448
|
@validate_call
|
|
4084
|
-
def
|
|
2449
|
+
def dataset_dataset_id_get(
|
|
4085
2450
|
self,
|
|
4086
|
-
dataset_id: Annotated[
|
|
4087
|
-
file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The csv file to import.")] = None,
|
|
2451
|
+
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get.")],
|
|
4088
2452
|
_request_timeout: Union[
|
|
4089
2453
|
None,
|
|
4090
2454
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -4097,14 +2461,12 @@ class DatasetApi:
|
|
|
4097
2461
|
_content_type: Optional[StrictStr] = None,
|
|
4098
2462
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4099
2463
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4100
|
-
) ->
|
|
4101
|
-
"""
|
|
2464
|
+
) -> GetDatasetByIdResult:
|
|
2465
|
+
"""Gets a dataset by its id.
|
|
4102
2466
|
|
|
4103
2467
|
|
|
4104
|
-
:param dataset_id: The id of the dataset to
|
|
2468
|
+
:param dataset_id: The id of the dataset to get. (required)
|
|
4105
2469
|
:type dataset_id: str
|
|
4106
|
-
:param file: The csv file to import.
|
|
4107
|
-
:type file: bytearray
|
|
4108
2470
|
:param _request_timeout: timeout setting for this request. If one
|
|
4109
2471
|
number provided, it will be total request
|
|
4110
2472
|
timeout. It can also be a pair (tuple) of
|
|
@@ -4126,11 +2488,9 @@ class DatasetApi:
|
|
|
4126
2488
|
:type _host_index: int, optional
|
|
4127
2489
|
:return: Returns the result object.
|
|
4128
2490
|
""" # noqa: E501
|
|
4129
|
-
warnings.warn("POST /dataset/import is deprecated.", DeprecationWarning)
|
|
4130
2491
|
|
|
4131
|
-
_param = self.
|
|
2492
|
+
_param = self._dataset_dataset_id_get_serialize(
|
|
4132
2493
|
dataset_id=dataset_id,
|
|
4133
|
-
file=file,
|
|
4134
2494
|
_request_auth=_request_auth,
|
|
4135
2495
|
_content_type=_content_type,
|
|
4136
2496
|
_headers=_headers,
|
|
@@ -4138,7 +2498,7 @@ class DatasetApi:
|
|
|
4138
2498
|
)
|
|
4139
2499
|
|
|
4140
2500
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
4141
|
-
'200': "
|
|
2501
|
+
'200': "GetDatasetByIdResult",
|
|
4142
2502
|
}
|
|
4143
2503
|
response_data = self.api_client.call_api(
|
|
4144
2504
|
*_param,
|
|
@@ -4152,10 +2512,9 @@ class DatasetApi:
|
|
|
4152
2512
|
|
|
4153
2513
|
|
|
4154
2514
|
@validate_call
|
|
4155
|
-
def
|
|
2515
|
+
def dataset_dataset_id_get_with_http_info(
|
|
4156
2516
|
self,
|
|
4157
|
-
dataset_id: Annotated[
|
|
4158
|
-
file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The csv file to import.")] = None,
|
|
2517
|
+
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get.")],
|
|
4159
2518
|
_request_timeout: Union[
|
|
4160
2519
|
None,
|
|
4161
2520
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -4168,14 +2527,12 @@ class DatasetApi:
|
|
|
4168
2527
|
_content_type: Optional[StrictStr] = None,
|
|
4169
2528
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4170
2529
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4171
|
-
) -> ApiResponse[
|
|
4172
|
-
"""
|
|
2530
|
+
) -> ApiResponse[GetDatasetByIdResult]:
|
|
2531
|
+
"""Gets a dataset by its id.
|
|
4173
2532
|
|
|
4174
2533
|
|
|
4175
|
-
:param dataset_id: The id of the dataset to
|
|
2534
|
+
:param dataset_id: The id of the dataset to get. (required)
|
|
4176
2535
|
:type dataset_id: str
|
|
4177
|
-
:param file: The csv file to import.
|
|
4178
|
-
:type file: bytearray
|
|
4179
2536
|
:param _request_timeout: timeout setting for this request. If one
|
|
4180
2537
|
number provided, it will be total request
|
|
4181
2538
|
timeout. It can also be a pair (tuple) of
|
|
@@ -4197,11 +2554,9 @@ class DatasetApi:
|
|
|
4197
2554
|
:type _host_index: int, optional
|
|
4198
2555
|
:return: Returns the result object.
|
|
4199
2556
|
""" # noqa: E501
|
|
4200
|
-
warnings.warn("POST /dataset/import is deprecated.", DeprecationWarning)
|
|
4201
2557
|
|
|
4202
|
-
_param = self.
|
|
2558
|
+
_param = self._dataset_dataset_id_get_serialize(
|
|
4203
2559
|
dataset_id=dataset_id,
|
|
4204
|
-
file=file,
|
|
4205
2560
|
_request_auth=_request_auth,
|
|
4206
2561
|
_content_type=_content_type,
|
|
4207
2562
|
_headers=_headers,
|
|
@@ -4209,7 +2564,7 @@ class DatasetApi:
|
|
|
4209
2564
|
)
|
|
4210
2565
|
|
|
4211
2566
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
4212
|
-
'200': "
|
|
2567
|
+
'200': "GetDatasetByIdResult",
|
|
4213
2568
|
}
|
|
4214
2569
|
response_data = self.api_client.call_api(
|
|
4215
2570
|
*_param,
|
|
@@ -4223,10 +2578,9 @@ class DatasetApi:
|
|
|
4223
2578
|
|
|
4224
2579
|
|
|
4225
2580
|
@validate_call
|
|
4226
|
-
def
|
|
2581
|
+
def dataset_dataset_id_get_without_preload_content(
|
|
4227
2582
|
self,
|
|
4228
|
-
dataset_id: Annotated[
|
|
4229
|
-
file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The csv file to import.")] = None,
|
|
2583
|
+
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get.")],
|
|
4230
2584
|
_request_timeout: Union[
|
|
4231
2585
|
None,
|
|
4232
2586
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -4240,13 +2594,11 @@ class DatasetApi:
|
|
|
4240
2594
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4241
2595
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4242
2596
|
) -> RESTResponseType:
|
|
4243
|
-
"""
|
|
2597
|
+
"""Gets a dataset by its id.
|
|
4244
2598
|
|
|
4245
2599
|
|
|
4246
|
-
:param dataset_id: The id of the dataset to
|
|
2600
|
+
:param dataset_id: The id of the dataset to get. (required)
|
|
4247
2601
|
:type dataset_id: str
|
|
4248
|
-
:param file: The csv file to import.
|
|
4249
|
-
:type file: bytearray
|
|
4250
2602
|
:param _request_timeout: timeout setting for this request. If one
|
|
4251
2603
|
number provided, it will be total request
|
|
4252
2604
|
timeout. It can also be a pair (tuple) of
|
|
@@ -4268,11 +2620,9 @@ class DatasetApi:
|
|
|
4268
2620
|
:type _host_index: int, optional
|
|
4269
2621
|
:return: Returns the result object.
|
|
4270
2622
|
""" # noqa: E501
|
|
4271
|
-
warnings.warn("POST /dataset/import is deprecated.", DeprecationWarning)
|
|
4272
2623
|
|
|
4273
|
-
_param = self.
|
|
2624
|
+
_param = self._dataset_dataset_id_get_serialize(
|
|
4274
2625
|
dataset_id=dataset_id,
|
|
4275
|
-
file=file,
|
|
4276
2626
|
_request_auth=_request_auth,
|
|
4277
2627
|
_content_type=_content_type,
|
|
4278
2628
|
_headers=_headers,
|
|
@@ -4280,7 +2630,7 @@ class DatasetApi:
|
|
|
4280
2630
|
)
|
|
4281
2631
|
|
|
4282
2632
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
4283
|
-
'200': "
|
|
2633
|
+
'200': "GetDatasetByIdResult",
|
|
4284
2634
|
}
|
|
4285
2635
|
response_data = self.api_client.call_api(
|
|
4286
2636
|
*_param,
|
|
@@ -4289,10 +2639,9 @@ class DatasetApi:
|
|
|
4289
2639
|
return response_data.response
|
|
4290
2640
|
|
|
4291
2641
|
|
|
4292
|
-
def
|
|
2642
|
+
def _dataset_dataset_id_get_serialize(
|
|
4293
2643
|
self,
|
|
4294
2644
|
dataset_id,
|
|
4295
|
-
file,
|
|
4296
2645
|
_request_auth,
|
|
4297
2646
|
_content_type,
|
|
4298
2647
|
_headers,
|
|
@@ -4314,15 +2663,11 @@ class DatasetApi:
|
|
|
4314
2663
|
_body_params: Optional[bytes] = None
|
|
4315
2664
|
|
|
4316
2665
|
# process the path parameters
|
|
4317
|
-
# process the query parameters
|
|
4318
2666
|
if dataset_id is not None:
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
2667
|
+
_path_params['datasetId'] = dataset_id
|
|
2668
|
+
# process the query parameters
|
|
4322
2669
|
# process the header parameters
|
|
4323
2670
|
# process the form parameters
|
|
4324
|
-
if file is not None:
|
|
4325
|
-
_files['file'] = file
|
|
4326
2671
|
# process the body parameter
|
|
4327
2672
|
|
|
4328
2673
|
|
|
@@ -4336,19 +2681,6 @@ class DatasetApi:
|
|
|
4336
2681
|
]
|
|
4337
2682
|
)
|
|
4338
2683
|
|
|
4339
|
-
# set the HTTP header `Content-Type`
|
|
4340
|
-
if _content_type:
|
|
4341
|
-
_header_params['Content-Type'] = _content_type
|
|
4342
|
-
else:
|
|
4343
|
-
_default_content_type = (
|
|
4344
|
-
self.api_client.select_header_content_type(
|
|
4345
|
-
[
|
|
4346
|
-
'multipart/form-data'
|
|
4347
|
-
]
|
|
4348
|
-
)
|
|
4349
|
-
)
|
|
4350
|
-
if _default_content_type is not None:
|
|
4351
|
-
_header_params['Content-Type'] = _default_content_type
|
|
4352
2684
|
|
|
4353
2685
|
# authentication setting
|
|
4354
2686
|
_auth_settings: List[str] = [
|
|
@@ -4357,8 +2689,8 @@ class DatasetApi:
|
|
|
4357
2689
|
]
|
|
4358
2690
|
|
|
4359
2691
|
return self.api_client.param_serialize(
|
|
4360
|
-
method='
|
|
4361
|
-
resource_path='/dataset/
|
|
2692
|
+
method='GET',
|
|
2693
|
+
resource_path='/dataset/{datasetId}',
|
|
4362
2694
|
path_params=_path_params,
|
|
4363
2695
|
query_params=_query_params,
|
|
4364
2696
|
header_params=_header_params,
|
|
@@ -4375,10 +2707,10 @@ class DatasetApi:
|
|
|
4375
2707
|
|
|
4376
2708
|
|
|
4377
2709
|
@validate_call
|
|
4378
|
-
def
|
|
2710
|
+
def dataset_dataset_id_name_patch(
|
|
4379
2711
|
self,
|
|
4380
|
-
|
|
4381
|
-
|
|
2712
|
+
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to update.")],
|
|
2713
|
+
update_dataset_name_model: Annotated[Optional[UpdateDatasetNameModel], Field(description="The body of the request.")] = None,
|
|
4382
2714
|
_request_timeout: Union[
|
|
4383
2715
|
None,
|
|
4384
2716
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -4392,13 +2724,13 @@ class DatasetApi:
|
|
|
4392
2724
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4393
2725
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4394
2726
|
) -> None:
|
|
4395
|
-
"""
|
|
2727
|
+
"""Updates the name of a dataset.
|
|
4396
2728
|
|
|
4397
2729
|
|
|
4398
|
-
:param
|
|
4399
|
-
:type
|
|
4400
|
-
:param
|
|
4401
|
-
:type
|
|
2730
|
+
:param dataset_id: The id of the dataset to update. (required)
|
|
2731
|
+
:type dataset_id: str
|
|
2732
|
+
:param update_dataset_name_model: The body of the request.
|
|
2733
|
+
:type update_dataset_name_model: UpdateDatasetNameModel
|
|
4402
2734
|
:param _request_timeout: timeout setting for this request. If one
|
|
4403
2735
|
number provided, it will be total request
|
|
4404
2736
|
timeout. It can also be a pair (tuple) of
|
|
@@ -4420,11 +2752,10 @@ class DatasetApi:
|
|
|
4420
2752
|
:type _host_index: int, optional
|
|
4421
2753
|
:return: Returns the result object.
|
|
4422
2754
|
""" # noqa: E501
|
|
4423
|
-
warnings.warn("POST /dataset/updatename is deprecated.", DeprecationWarning)
|
|
4424
2755
|
|
|
4425
|
-
_param = self.
|
|
4426
|
-
|
|
4427
|
-
|
|
2756
|
+
_param = self._dataset_dataset_id_name_patch_serialize(
|
|
2757
|
+
dataset_id=dataset_id,
|
|
2758
|
+
update_dataset_name_model=update_dataset_name_model,
|
|
4428
2759
|
_request_auth=_request_auth,
|
|
4429
2760
|
_content_type=_content_type,
|
|
4430
2761
|
_headers=_headers,
|
|
@@ -4432,7 +2763,7 @@ class DatasetApi:
|
|
|
4432
2763
|
)
|
|
4433
2764
|
|
|
4434
2765
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
4435
|
-
'
|
|
2766
|
+
'204': None,
|
|
4436
2767
|
}
|
|
4437
2768
|
response_data = self.api_client.call_api(
|
|
4438
2769
|
*_param,
|
|
@@ -4446,10 +2777,10 @@ class DatasetApi:
|
|
|
4446
2777
|
|
|
4447
2778
|
|
|
4448
2779
|
@validate_call
|
|
4449
|
-
def
|
|
2780
|
+
def dataset_dataset_id_name_patch_with_http_info(
|
|
4450
2781
|
self,
|
|
4451
|
-
|
|
4452
|
-
|
|
2782
|
+
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to update.")],
|
|
2783
|
+
update_dataset_name_model: Annotated[Optional[UpdateDatasetNameModel], Field(description="The body of the request.")] = None,
|
|
4453
2784
|
_request_timeout: Union[
|
|
4454
2785
|
None,
|
|
4455
2786
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -4463,13 +2794,13 @@ class DatasetApi:
|
|
|
4463
2794
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4464
2795
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4465
2796
|
) -> ApiResponse[None]:
|
|
4466
|
-
"""
|
|
2797
|
+
"""Updates the name of a dataset.
|
|
4467
2798
|
|
|
4468
2799
|
|
|
4469
|
-
:param
|
|
4470
|
-
:type
|
|
4471
|
-
:param
|
|
4472
|
-
:type
|
|
2800
|
+
:param dataset_id: The id of the dataset to update. (required)
|
|
2801
|
+
:type dataset_id: str
|
|
2802
|
+
:param update_dataset_name_model: The body of the request.
|
|
2803
|
+
:type update_dataset_name_model: UpdateDatasetNameModel
|
|
4473
2804
|
:param _request_timeout: timeout setting for this request. If one
|
|
4474
2805
|
number provided, it will be total request
|
|
4475
2806
|
timeout. It can also be a pair (tuple) of
|
|
@@ -4491,11 +2822,10 @@ class DatasetApi:
|
|
|
4491
2822
|
:type _host_index: int, optional
|
|
4492
2823
|
:return: Returns the result object.
|
|
4493
2824
|
""" # noqa: E501
|
|
4494
|
-
warnings.warn("POST /dataset/updatename is deprecated.", DeprecationWarning)
|
|
4495
2825
|
|
|
4496
|
-
_param = self.
|
|
4497
|
-
|
|
4498
|
-
|
|
2826
|
+
_param = self._dataset_dataset_id_name_patch_serialize(
|
|
2827
|
+
dataset_id=dataset_id,
|
|
2828
|
+
update_dataset_name_model=update_dataset_name_model,
|
|
4499
2829
|
_request_auth=_request_auth,
|
|
4500
2830
|
_content_type=_content_type,
|
|
4501
2831
|
_headers=_headers,
|
|
@@ -4503,7 +2833,7 @@ class DatasetApi:
|
|
|
4503
2833
|
)
|
|
4504
2834
|
|
|
4505
2835
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
4506
|
-
'
|
|
2836
|
+
'204': None,
|
|
4507
2837
|
}
|
|
4508
2838
|
response_data = self.api_client.call_api(
|
|
4509
2839
|
*_param,
|
|
@@ -4517,10 +2847,10 @@ class DatasetApi:
|
|
|
4517
2847
|
|
|
4518
2848
|
|
|
4519
2849
|
@validate_call
|
|
4520
|
-
def
|
|
2850
|
+
def dataset_dataset_id_name_patch_without_preload_content(
|
|
4521
2851
|
self,
|
|
4522
|
-
|
|
4523
|
-
|
|
2852
|
+
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to update.")],
|
|
2853
|
+
update_dataset_name_model: Annotated[Optional[UpdateDatasetNameModel], Field(description="The body of the request.")] = None,
|
|
4524
2854
|
_request_timeout: Union[
|
|
4525
2855
|
None,
|
|
4526
2856
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -4534,13 +2864,13 @@ class DatasetApi:
|
|
|
4534
2864
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4535
2865
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4536
2866
|
) -> RESTResponseType:
|
|
4537
|
-
"""
|
|
2867
|
+
"""Updates the name of a dataset.
|
|
4538
2868
|
|
|
4539
2869
|
|
|
4540
|
-
:param
|
|
4541
|
-
:type
|
|
4542
|
-
:param
|
|
4543
|
-
:type
|
|
2870
|
+
:param dataset_id: The id of the dataset to update. (required)
|
|
2871
|
+
:type dataset_id: str
|
|
2872
|
+
:param update_dataset_name_model: The body of the request.
|
|
2873
|
+
:type update_dataset_name_model: UpdateDatasetNameModel
|
|
4544
2874
|
:param _request_timeout: timeout setting for this request. If one
|
|
4545
2875
|
number provided, it will be total request
|
|
4546
2876
|
timeout. It can also be a pair (tuple) of
|
|
@@ -4562,11 +2892,10 @@ class DatasetApi:
|
|
|
4562
2892
|
:type _host_index: int, optional
|
|
4563
2893
|
:return: Returns the result object.
|
|
4564
2894
|
""" # noqa: E501
|
|
4565
|
-
warnings.warn("POST /dataset/updatename is deprecated.", DeprecationWarning)
|
|
4566
2895
|
|
|
4567
|
-
_param = self.
|
|
4568
|
-
|
|
4569
|
-
|
|
2896
|
+
_param = self._dataset_dataset_id_name_patch_serialize(
|
|
2897
|
+
dataset_id=dataset_id,
|
|
2898
|
+
update_dataset_name_model=update_dataset_name_model,
|
|
4570
2899
|
_request_auth=_request_auth,
|
|
4571
2900
|
_content_type=_content_type,
|
|
4572
2901
|
_headers=_headers,
|
|
@@ -4574,7 +2903,7 @@ class DatasetApi:
|
|
|
4574
2903
|
)
|
|
4575
2904
|
|
|
4576
2905
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
4577
|
-
'
|
|
2906
|
+
'204': None,
|
|
4578
2907
|
}
|
|
4579
2908
|
response_data = self.api_client.call_api(
|
|
4580
2909
|
*_param,
|
|
@@ -4583,10 +2912,10 @@ class DatasetApi:
|
|
|
4583
2912
|
return response_data.response
|
|
4584
2913
|
|
|
4585
2914
|
|
|
4586
|
-
def
|
|
2915
|
+
def _dataset_dataset_id_name_patch_serialize(
|
|
4587
2916
|
self,
|
|
4588
|
-
|
|
4589
|
-
|
|
2917
|
+
dataset_id,
|
|
2918
|
+
update_dataset_name_model,
|
|
4590
2919
|
_request_auth,
|
|
4591
2920
|
_content_type,
|
|
4592
2921
|
_headers,
|
|
@@ -4608,21 +2937,32 @@ class DatasetApi:
|
|
|
4608
2937
|
_body_params: Optional[bytes] = None
|
|
4609
2938
|
|
|
4610
2939
|
# process the path parameters
|
|
2940
|
+
if dataset_id is not None:
|
|
2941
|
+
_path_params['datasetId'] = dataset_id
|
|
4611
2942
|
# process the query parameters
|
|
4612
|
-
if id is not None:
|
|
4613
|
-
|
|
4614
|
-
_query_params.append(('id', id))
|
|
4615
|
-
|
|
4616
|
-
if name is not None:
|
|
4617
|
-
|
|
4618
|
-
_query_params.append(('name', name))
|
|
4619
|
-
|
|
4620
2943
|
# process the header parameters
|
|
4621
2944
|
# process the form parameters
|
|
4622
2945
|
# process the body parameter
|
|
2946
|
+
if update_dataset_name_model is not None:
|
|
2947
|
+
_body_params = update_dataset_name_model
|
|
4623
2948
|
|
|
4624
2949
|
|
|
4625
2950
|
|
|
2951
|
+
# set the HTTP header `Content-Type`
|
|
2952
|
+
if _content_type:
|
|
2953
|
+
_header_params['Content-Type'] = _content_type
|
|
2954
|
+
else:
|
|
2955
|
+
_default_content_type = (
|
|
2956
|
+
self.api_client.select_header_content_type(
|
|
2957
|
+
[
|
|
2958
|
+
'application/json',
|
|
2959
|
+
'text/json',
|
|
2960
|
+
'application/*+json'
|
|
2961
|
+
]
|
|
2962
|
+
)
|
|
2963
|
+
)
|
|
2964
|
+
if _default_content_type is not None:
|
|
2965
|
+
_header_params['Content-Type'] = _default_content_type
|
|
4626
2966
|
|
|
4627
2967
|
# authentication setting
|
|
4628
2968
|
_auth_settings: List[str] = [
|
|
@@ -4631,8 +2971,8 @@ class DatasetApi:
|
|
|
4631
2971
|
]
|
|
4632
2972
|
|
|
4633
2973
|
return self.api_client.param_serialize(
|
|
4634
|
-
method='
|
|
4635
|
-
resource_path='/dataset/
|
|
2974
|
+
method='PATCH',
|
|
2975
|
+
resource_path='/dataset/{datasetId}/name',
|
|
4636
2976
|
path_params=_path_params,
|
|
4637
2977
|
query_params=_query_params,
|
|
4638
2978
|
header_params=_header_params,
|
|
@@ -4649,9 +2989,9 @@ class DatasetApi:
|
|
|
4649
2989
|
|
|
4650
2990
|
|
|
4651
2991
|
@validate_call
|
|
4652
|
-
def
|
|
2992
|
+
def dataset_dataset_id_progress_get(
|
|
4653
2993
|
self,
|
|
4654
|
-
|
|
2994
|
+
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get the progress of.")],
|
|
4655
2995
|
_request_timeout: Union[
|
|
4656
2996
|
None,
|
|
4657
2997
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -4664,13 +3004,12 @@ class DatasetApi:
|
|
|
4664
3004
|
_content_type: Optional[StrictStr] = None,
|
|
4665
3005
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4666
3006
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4667
|
-
) ->
|
|
4668
|
-
"""
|
|
3007
|
+
) -> GetDatasetProgressResult:
|
|
3008
|
+
"""Gets the upload progress of a dataset.
|
|
4669
3009
|
|
|
4670
|
-
A new datapoint will be created for each file in the bucket.
|
|
4671
3010
|
|
|
4672
|
-
:param
|
|
4673
|
-
:type
|
|
3011
|
+
:param dataset_id: The id of the dataset to get the progress of. (required)
|
|
3012
|
+
:type dataset_id: str
|
|
4674
3013
|
:param _request_timeout: timeout setting for this request. If one
|
|
4675
3014
|
number provided, it will be total request
|
|
4676
3015
|
timeout. It can also be a pair (tuple) of
|
|
@@ -4692,10 +3031,9 @@ class DatasetApi:
|
|
|
4692
3031
|
:type _host_index: int, optional
|
|
4693
3032
|
:return: Returns the result object.
|
|
4694
3033
|
""" # noqa: E501
|
|
4695
|
-
warnings.warn("POST /dataset/uploadfilesfroms3 is deprecated.", DeprecationWarning)
|
|
4696
3034
|
|
|
4697
|
-
_param = self.
|
|
4698
|
-
|
|
3035
|
+
_param = self._dataset_dataset_id_progress_get_serialize(
|
|
3036
|
+
dataset_id=dataset_id,
|
|
4699
3037
|
_request_auth=_request_auth,
|
|
4700
3038
|
_content_type=_content_type,
|
|
4701
3039
|
_headers=_headers,
|
|
@@ -4703,7 +3041,7 @@ class DatasetApi:
|
|
|
4703
3041
|
)
|
|
4704
3042
|
|
|
4705
3043
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
4706
|
-
'200': "
|
|
3044
|
+
'200': "GetDatasetProgressResult",
|
|
4707
3045
|
}
|
|
4708
3046
|
response_data = self.api_client.call_api(
|
|
4709
3047
|
*_param,
|
|
@@ -4717,9 +3055,9 @@ class DatasetApi:
|
|
|
4717
3055
|
|
|
4718
3056
|
|
|
4719
3057
|
@validate_call
|
|
4720
|
-
def
|
|
3058
|
+
def dataset_dataset_id_progress_get_with_http_info(
|
|
4721
3059
|
self,
|
|
4722
|
-
|
|
3060
|
+
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get the progress of.")],
|
|
4723
3061
|
_request_timeout: Union[
|
|
4724
3062
|
None,
|
|
4725
3063
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -4732,13 +3070,12 @@ class DatasetApi:
|
|
|
4732
3070
|
_content_type: Optional[StrictStr] = None,
|
|
4733
3071
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4734
3072
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4735
|
-
) -> ApiResponse[
|
|
4736
|
-
"""
|
|
3073
|
+
) -> ApiResponse[GetDatasetProgressResult]:
|
|
3074
|
+
"""Gets the upload progress of a dataset.
|
|
4737
3075
|
|
|
4738
|
-
A new datapoint will be created for each file in the bucket.
|
|
4739
3076
|
|
|
4740
|
-
:param
|
|
4741
|
-
:type
|
|
3077
|
+
:param dataset_id: The id of the dataset to get the progress of. (required)
|
|
3078
|
+
:type dataset_id: str
|
|
4742
3079
|
:param _request_timeout: timeout setting for this request. If one
|
|
4743
3080
|
number provided, it will be total request
|
|
4744
3081
|
timeout. It can also be a pair (tuple) of
|
|
@@ -4760,10 +3097,9 @@ class DatasetApi:
|
|
|
4760
3097
|
:type _host_index: int, optional
|
|
4761
3098
|
:return: Returns the result object.
|
|
4762
3099
|
""" # noqa: E501
|
|
4763
|
-
warnings.warn("POST /dataset/uploadfilesfroms3 is deprecated.", DeprecationWarning)
|
|
4764
3100
|
|
|
4765
|
-
_param = self.
|
|
4766
|
-
|
|
3101
|
+
_param = self._dataset_dataset_id_progress_get_serialize(
|
|
3102
|
+
dataset_id=dataset_id,
|
|
4767
3103
|
_request_auth=_request_auth,
|
|
4768
3104
|
_content_type=_content_type,
|
|
4769
3105
|
_headers=_headers,
|
|
@@ -4771,7 +3107,7 @@ class DatasetApi:
|
|
|
4771
3107
|
)
|
|
4772
3108
|
|
|
4773
3109
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
4774
|
-
'200': "
|
|
3110
|
+
'200': "GetDatasetProgressResult",
|
|
4775
3111
|
}
|
|
4776
3112
|
response_data = self.api_client.call_api(
|
|
4777
3113
|
*_param,
|
|
@@ -4785,9 +3121,9 @@ class DatasetApi:
|
|
|
4785
3121
|
|
|
4786
3122
|
|
|
4787
3123
|
@validate_call
|
|
4788
|
-
def
|
|
3124
|
+
def dataset_dataset_id_progress_get_without_preload_content(
|
|
4789
3125
|
self,
|
|
4790
|
-
|
|
3126
|
+
dataset_id: Annotated[StrictStr, Field(description="The id of the dataset to get the progress of.")],
|
|
4791
3127
|
_request_timeout: Union[
|
|
4792
3128
|
None,
|
|
4793
3129
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -4801,12 +3137,11 @@ class DatasetApi:
|
|
|
4801
3137
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
4802
3138
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
4803
3139
|
) -> RESTResponseType:
|
|
4804
|
-
"""
|
|
3140
|
+
"""Gets the upload progress of a dataset.
|
|
4805
3141
|
|
|
4806
|
-
A new datapoint will be created for each file in the bucket.
|
|
4807
3142
|
|
|
4808
|
-
:param
|
|
4809
|
-
:type
|
|
3143
|
+
:param dataset_id: The id of the dataset to get the progress of. (required)
|
|
3144
|
+
:type dataset_id: str
|
|
4810
3145
|
:param _request_timeout: timeout setting for this request. If one
|
|
4811
3146
|
number provided, it will be total request
|
|
4812
3147
|
timeout. It can also be a pair (tuple) of
|
|
@@ -4828,10 +3163,9 @@ class DatasetApi:
|
|
|
4828
3163
|
:type _host_index: int, optional
|
|
4829
3164
|
:return: Returns the result object.
|
|
4830
3165
|
""" # noqa: E501
|
|
4831
|
-
warnings.warn("POST /dataset/uploadfilesfroms3 is deprecated.", DeprecationWarning)
|
|
4832
3166
|
|
|
4833
|
-
_param = self.
|
|
4834
|
-
|
|
3167
|
+
_param = self._dataset_dataset_id_progress_get_serialize(
|
|
3168
|
+
dataset_id=dataset_id,
|
|
4835
3169
|
_request_auth=_request_auth,
|
|
4836
3170
|
_content_type=_content_type,
|
|
4837
3171
|
_headers=_headers,
|
|
@@ -4839,7 +3173,7 @@ class DatasetApi:
|
|
|
4839
3173
|
)
|
|
4840
3174
|
|
|
4841
3175
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
4842
|
-
'200': "
|
|
3176
|
+
'200': "GetDatasetProgressResult",
|
|
4843
3177
|
}
|
|
4844
3178
|
response_data = self.api_client.call_api(
|
|
4845
3179
|
*_param,
|
|
@@ -4848,9 +3182,9 @@ class DatasetApi:
|
|
|
4848
3182
|
return response_data.response
|
|
4849
3183
|
|
|
4850
3184
|
|
|
4851
|
-
def
|
|
3185
|
+
def _dataset_dataset_id_progress_get_serialize(
|
|
4852
3186
|
self,
|
|
4853
|
-
|
|
3187
|
+
dataset_id,
|
|
4854
3188
|
_request_auth,
|
|
4855
3189
|
_content_type,
|
|
4856
3190
|
_headers,
|
|
@@ -4872,12 +3206,12 @@ class DatasetApi:
|
|
|
4872
3206
|
_body_params: Optional[bytes] = None
|
|
4873
3207
|
|
|
4874
3208
|
# process the path parameters
|
|
3209
|
+
if dataset_id is not None:
|
|
3210
|
+
_path_params['datasetId'] = dataset_id
|
|
4875
3211
|
# process the query parameters
|
|
4876
3212
|
# process the header parameters
|
|
4877
3213
|
# process the form parameters
|
|
4878
3214
|
# process the body parameter
|
|
4879
|
-
if upload_files_from_s3_bucket_model is not None:
|
|
4880
|
-
_body_params = upload_files_from_s3_bucket_model
|
|
4881
3215
|
|
|
4882
3216
|
|
|
4883
3217
|
# set the HTTP header `Accept`
|
|
@@ -4890,21 +3224,6 @@ class DatasetApi:
|
|
|
4890
3224
|
]
|
|
4891
3225
|
)
|
|
4892
3226
|
|
|
4893
|
-
# set the HTTP header `Content-Type`
|
|
4894
|
-
if _content_type:
|
|
4895
|
-
_header_params['Content-Type'] = _content_type
|
|
4896
|
-
else:
|
|
4897
|
-
_default_content_type = (
|
|
4898
|
-
self.api_client.select_header_content_type(
|
|
4899
|
-
[
|
|
4900
|
-
'application/json',
|
|
4901
|
-
'text/json',
|
|
4902
|
-
'application/*+json'
|
|
4903
|
-
]
|
|
4904
|
-
)
|
|
4905
|
-
)
|
|
4906
|
-
if _default_content_type is not None:
|
|
4907
|
-
_header_params['Content-Type'] = _default_content_type
|
|
4908
3227
|
|
|
4909
3228
|
# authentication setting
|
|
4910
3229
|
_auth_settings: List[str] = [
|
|
@@ -4913,8 +3232,8 @@ class DatasetApi:
|
|
|
4913
3232
|
]
|
|
4914
3233
|
|
|
4915
3234
|
return self.api_client.param_serialize(
|
|
4916
|
-
method='
|
|
4917
|
-
resource_path='/dataset/
|
|
3235
|
+
method='GET',
|
|
3236
|
+
resource_path='/dataset/{datasetId}/progress',
|
|
4918
3237
|
path_params=_path_params,
|
|
4919
3238
|
query_params=_query_params,
|
|
4920
3239
|
header_params=_header_params,
|