scale-gp-beta 0.1.0a40__py3-none-any.whl → 0.1.0a41__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.
@@ -0,0 +1,582 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Mapping, cast
6
+ from typing_extensions import Literal
7
+
8
+ import httpx
9
+
10
+ from ..types import build_list_params, build_create_params
11
+ from .._types import Body, Omit, Query, Headers, NotGiven, FileTypes, omit, not_given
12
+ from .._utils import extract_files, maybe_transform, deepcopy_minimal, async_maybe_transform
13
+ from .._compat import cached_property
14
+ from .._resource import SyncAPIResource, AsyncAPIResource
15
+ from .._response import (
16
+ to_raw_response_wrapper,
17
+ to_streamed_response_wrapper,
18
+ async_to_raw_response_wrapper,
19
+ async_to_streamed_response_wrapper,
20
+ )
21
+ from ..pagination import SyncCursorPage, AsyncCursorPage
22
+ from .._base_client import AsyncPaginator, make_request_options
23
+ from ..types.build_list_response import BuildListResponse
24
+ from ..types.build_cancel_response import BuildCancelResponse
25
+ from ..types.build_create_response import BuildCreateResponse
26
+ from ..types.build_retrieve_response import BuildRetrieveResponse
27
+
28
+ __all__ = ["BuildResource", "AsyncBuildResource"]
29
+
30
+
31
+ class BuildResource(SyncAPIResource):
32
+ @cached_property
33
+ def with_raw_response(self) -> BuildResourceWithRawResponse:
34
+ """
35
+ This property can be used as a prefix for any HTTP method call to return
36
+ the raw response object instead of the parsed content.
37
+
38
+ For more information, see https://www.github.com/scaleapi/sgp-python-beta#accessing-raw-response-data-eg-headers
39
+ """
40
+ return BuildResourceWithRawResponse(self)
41
+
42
+ @cached_property
43
+ def with_streaming_response(self) -> BuildResourceWithStreamingResponse:
44
+ """
45
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
46
+
47
+ For more information, see https://www.github.com/scaleapi/sgp-python-beta#with_streaming_response
48
+ """
49
+ return BuildResourceWithStreamingResponse(self)
50
+
51
+ def create(
52
+ self,
53
+ *,
54
+ context_archive: FileTypes,
55
+ image_name: str,
56
+ build_args: str | Omit = omit,
57
+ image_tag: str | Omit = omit,
58
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
59
+ # The extra values given here take precedence over values defined on the client or passed to this method.
60
+ extra_headers: Headers | None = None,
61
+ extra_query: Query | None = None,
62
+ extra_body: Body | None = None,
63
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
64
+ ) -> BuildCreateResponse:
65
+ """
66
+ Submit a container image build.
67
+
68
+ Upload a tar.gz archive containing the build context (Dockerfile and any files
69
+ needed for the build) along with image name, tag, and optional build arguments.
70
+
71
+ Maximum file size: 500MB
72
+
73
+ Args:
74
+ context_archive: tar.gz archive containing the build context (Dockerfile and any files needed for
75
+ the build)
76
+
77
+ image_name: Name for the built image
78
+
79
+ build_args: JSON string of build arguments
80
+
81
+ image_tag: Tag for the built image
82
+
83
+ extra_headers: Send extra headers
84
+
85
+ extra_query: Add additional query parameters to the request
86
+
87
+ extra_body: Add additional JSON properties to the request
88
+
89
+ timeout: Override the client-level default timeout for this request, in seconds
90
+ """
91
+ body = deepcopy_minimal(
92
+ {
93
+ "context_archive": context_archive,
94
+ "image_name": image_name,
95
+ "build_args": build_args,
96
+ "image_tag": image_tag,
97
+ }
98
+ )
99
+ files = extract_files(cast(Mapping[str, object], body), paths=[["context_archive"]])
100
+ # It should be noted that the actual Content-Type header that will be
101
+ # sent to the server will contain a `boundary` parameter, e.g.
102
+ # multipart/form-data; boundary=---abc--
103
+ extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
104
+ return self._post(
105
+ "/v5/builds",
106
+ body=maybe_transform(body, build_create_params.BuildCreateParams),
107
+ files=files,
108
+ options=make_request_options(
109
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
110
+ ),
111
+ cast_to=BuildCreateResponse,
112
+ )
113
+
114
+ def retrieve(
115
+ self,
116
+ build_id: str,
117
+ *,
118
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
119
+ # The extra values given here take precedence over values defined on the client or passed to this method.
120
+ extra_headers: Headers | None = None,
121
+ extra_query: Query | None = None,
122
+ extra_body: Body | None = None,
123
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
124
+ ) -> BuildRetrieveResponse:
125
+ """
126
+ Get a build by ID, including current status from the cloud provider.
127
+
128
+ Args:
129
+ extra_headers: Send extra headers
130
+
131
+ extra_query: Add additional query parameters to the request
132
+
133
+ extra_body: Add additional JSON properties to the request
134
+
135
+ timeout: Override the client-level default timeout for this request, in seconds
136
+ """
137
+ if not build_id:
138
+ raise ValueError(f"Expected a non-empty value for `build_id` but received {build_id!r}")
139
+ return self._get(
140
+ f"/v5/builds/{build_id}",
141
+ options=make_request_options(
142
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
143
+ ),
144
+ cast_to=BuildRetrieveResponse,
145
+ )
146
+
147
+ def list(
148
+ self,
149
+ *,
150
+ ending_before: str | Omit = omit,
151
+ limit: int | Omit = omit,
152
+ sort_by: str | Omit = omit,
153
+ sort_order: Literal["asc", "desc"] | Omit = omit,
154
+ starting_after: str | Omit = omit,
155
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
156
+ # The extra values given here take precedence over values defined on the client or passed to this method.
157
+ extra_headers: Headers | None = None,
158
+ extra_query: Query | None = None,
159
+ extra_body: Body | None = None,
160
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
161
+ ) -> SyncCursorPage[BuildListResponse]:
162
+ """
163
+ List Builds
164
+
165
+ Args:
166
+ extra_headers: Send extra headers
167
+
168
+ extra_query: Add additional query parameters to the request
169
+
170
+ extra_body: Add additional JSON properties to the request
171
+
172
+ timeout: Override the client-level default timeout for this request, in seconds
173
+ """
174
+ return self._get_api_list(
175
+ "/v5/builds",
176
+ page=SyncCursorPage[BuildListResponse],
177
+ options=make_request_options(
178
+ extra_headers=extra_headers,
179
+ extra_query=extra_query,
180
+ extra_body=extra_body,
181
+ timeout=timeout,
182
+ query=maybe_transform(
183
+ {
184
+ "ending_before": ending_before,
185
+ "limit": limit,
186
+ "sort_by": sort_by,
187
+ "sort_order": sort_order,
188
+ "starting_after": starting_after,
189
+ },
190
+ build_list_params.BuildListParams,
191
+ ),
192
+ ),
193
+ model=BuildListResponse,
194
+ )
195
+
196
+ def cancel(
197
+ self,
198
+ build_id: str,
199
+ *,
200
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
201
+ # The extra values given here take precedence over values defined on the client or passed to this method.
202
+ extra_headers: Headers | None = None,
203
+ extra_query: Query | None = None,
204
+ extra_body: Body | None = None,
205
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
206
+ ) -> BuildCancelResponse:
207
+ """
208
+ Cancel a pending or running build.
209
+
210
+ Args:
211
+ extra_headers: Send extra headers
212
+
213
+ extra_query: Add additional query parameters to the request
214
+
215
+ extra_body: Add additional JSON properties to the request
216
+
217
+ timeout: Override the client-level default timeout for this request, in seconds
218
+ """
219
+ if not build_id:
220
+ raise ValueError(f"Expected a non-empty value for `build_id` but received {build_id!r}")
221
+ return self._post(
222
+ f"/v5/builds/{build_id}/cancel",
223
+ options=make_request_options(
224
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
225
+ ),
226
+ cast_to=BuildCancelResponse,
227
+ )
228
+
229
+ def logs(
230
+ self,
231
+ build_id: str,
232
+ *,
233
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
234
+ # The extra values given here take precedence over values defined on the client or passed to this method.
235
+ extra_headers: Headers | None = None,
236
+ extra_query: Query | None = None,
237
+ extra_body: Body | None = None,
238
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
239
+ ) -> object:
240
+ """
241
+ Stream build logs via Server-Sent Events (SSE).
242
+
243
+ Returns a streaming response with content-type text/event-stream. Each log line
244
+ is sent as an SSE data event.
245
+
246
+ Args:
247
+ extra_headers: Send extra headers
248
+
249
+ extra_query: Add additional query parameters to the request
250
+
251
+ extra_body: Add additional JSON properties to the request
252
+
253
+ timeout: Override the client-level default timeout for this request, in seconds
254
+ """
255
+ if not build_id:
256
+ raise ValueError(f"Expected a non-empty value for `build_id` but received {build_id!r}")
257
+ return self._get(
258
+ f"/v5/builds/{build_id}/logs",
259
+ options=make_request_options(
260
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
261
+ ),
262
+ cast_to=object,
263
+ )
264
+
265
+
266
+ class AsyncBuildResource(AsyncAPIResource):
267
+ @cached_property
268
+ def with_raw_response(self) -> AsyncBuildResourceWithRawResponse:
269
+ """
270
+ This property can be used as a prefix for any HTTP method call to return
271
+ the raw response object instead of the parsed content.
272
+
273
+ For more information, see https://www.github.com/scaleapi/sgp-python-beta#accessing-raw-response-data-eg-headers
274
+ """
275
+ return AsyncBuildResourceWithRawResponse(self)
276
+
277
+ @cached_property
278
+ def with_streaming_response(self) -> AsyncBuildResourceWithStreamingResponse:
279
+ """
280
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
281
+
282
+ For more information, see https://www.github.com/scaleapi/sgp-python-beta#with_streaming_response
283
+ """
284
+ return AsyncBuildResourceWithStreamingResponse(self)
285
+
286
+ async def create(
287
+ self,
288
+ *,
289
+ context_archive: FileTypes,
290
+ image_name: str,
291
+ build_args: str | Omit = omit,
292
+ image_tag: str | Omit = omit,
293
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
294
+ # The extra values given here take precedence over values defined on the client or passed to this method.
295
+ extra_headers: Headers | None = None,
296
+ extra_query: Query | None = None,
297
+ extra_body: Body | None = None,
298
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
299
+ ) -> BuildCreateResponse:
300
+ """
301
+ Submit a container image build.
302
+
303
+ Upload a tar.gz archive containing the build context (Dockerfile and any files
304
+ needed for the build) along with image name, tag, and optional build arguments.
305
+
306
+ Maximum file size: 500MB
307
+
308
+ Args:
309
+ context_archive: tar.gz archive containing the build context (Dockerfile and any files needed for
310
+ the build)
311
+
312
+ image_name: Name for the built image
313
+
314
+ build_args: JSON string of build arguments
315
+
316
+ image_tag: Tag for the built image
317
+
318
+ extra_headers: Send extra headers
319
+
320
+ extra_query: Add additional query parameters to the request
321
+
322
+ extra_body: Add additional JSON properties to the request
323
+
324
+ timeout: Override the client-level default timeout for this request, in seconds
325
+ """
326
+ body = deepcopy_minimal(
327
+ {
328
+ "context_archive": context_archive,
329
+ "image_name": image_name,
330
+ "build_args": build_args,
331
+ "image_tag": image_tag,
332
+ }
333
+ )
334
+ files = extract_files(cast(Mapping[str, object], body), paths=[["context_archive"]])
335
+ # It should be noted that the actual Content-Type header that will be
336
+ # sent to the server will contain a `boundary` parameter, e.g.
337
+ # multipart/form-data; boundary=---abc--
338
+ extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
339
+ return await self._post(
340
+ "/v5/builds",
341
+ body=await async_maybe_transform(body, build_create_params.BuildCreateParams),
342
+ files=files,
343
+ options=make_request_options(
344
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
345
+ ),
346
+ cast_to=BuildCreateResponse,
347
+ )
348
+
349
+ async def retrieve(
350
+ self,
351
+ build_id: str,
352
+ *,
353
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
354
+ # The extra values given here take precedence over values defined on the client or passed to this method.
355
+ extra_headers: Headers | None = None,
356
+ extra_query: Query | None = None,
357
+ extra_body: Body | None = None,
358
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
359
+ ) -> BuildRetrieveResponse:
360
+ """
361
+ Get a build by ID, including current status from the cloud provider.
362
+
363
+ Args:
364
+ extra_headers: Send extra headers
365
+
366
+ extra_query: Add additional query parameters to the request
367
+
368
+ extra_body: Add additional JSON properties to the request
369
+
370
+ timeout: Override the client-level default timeout for this request, in seconds
371
+ """
372
+ if not build_id:
373
+ raise ValueError(f"Expected a non-empty value for `build_id` but received {build_id!r}")
374
+ return await self._get(
375
+ f"/v5/builds/{build_id}",
376
+ options=make_request_options(
377
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
378
+ ),
379
+ cast_to=BuildRetrieveResponse,
380
+ )
381
+
382
+ def list(
383
+ self,
384
+ *,
385
+ ending_before: str | Omit = omit,
386
+ limit: int | Omit = omit,
387
+ sort_by: str | Omit = omit,
388
+ sort_order: Literal["asc", "desc"] | Omit = omit,
389
+ starting_after: str | Omit = omit,
390
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
391
+ # The extra values given here take precedence over values defined on the client or passed to this method.
392
+ extra_headers: Headers | None = None,
393
+ extra_query: Query | None = None,
394
+ extra_body: Body | None = None,
395
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
396
+ ) -> AsyncPaginator[BuildListResponse, AsyncCursorPage[BuildListResponse]]:
397
+ """
398
+ List Builds
399
+
400
+ Args:
401
+ extra_headers: Send extra headers
402
+
403
+ extra_query: Add additional query parameters to the request
404
+
405
+ extra_body: Add additional JSON properties to the request
406
+
407
+ timeout: Override the client-level default timeout for this request, in seconds
408
+ """
409
+ return self._get_api_list(
410
+ "/v5/builds",
411
+ page=AsyncCursorPage[BuildListResponse],
412
+ options=make_request_options(
413
+ extra_headers=extra_headers,
414
+ extra_query=extra_query,
415
+ extra_body=extra_body,
416
+ timeout=timeout,
417
+ query=maybe_transform(
418
+ {
419
+ "ending_before": ending_before,
420
+ "limit": limit,
421
+ "sort_by": sort_by,
422
+ "sort_order": sort_order,
423
+ "starting_after": starting_after,
424
+ },
425
+ build_list_params.BuildListParams,
426
+ ),
427
+ ),
428
+ model=BuildListResponse,
429
+ )
430
+
431
+ async def cancel(
432
+ self,
433
+ build_id: str,
434
+ *,
435
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
436
+ # The extra values given here take precedence over values defined on the client or passed to this method.
437
+ extra_headers: Headers | None = None,
438
+ extra_query: Query | None = None,
439
+ extra_body: Body | None = None,
440
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
441
+ ) -> BuildCancelResponse:
442
+ """
443
+ Cancel a pending or running build.
444
+
445
+ Args:
446
+ extra_headers: Send extra headers
447
+
448
+ extra_query: Add additional query parameters to the request
449
+
450
+ extra_body: Add additional JSON properties to the request
451
+
452
+ timeout: Override the client-level default timeout for this request, in seconds
453
+ """
454
+ if not build_id:
455
+ raise ValueError(f"Expected a non-empty value for `build_id` but received {build_id!r}")
456
+ return await self._post(
457
+ f"/v5/builds/{build_id}/cancel",
458
+ options=make_request_options(
459
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
460
+ ),
461
+ cast_to=BuildCancelResponse,
462
+ )
463
+
464
+ async def logs(
465
+ self,
466
+ build_id: str,
467
+ *,
468
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
469
+ # The extra values given here take precedence over values defined on the client or passed to this method.
470
+ extra_headers: Headers | None = None,
471
+ extra_query: Query | None = None,
472
+ extra_body: Body | None = None,
473
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
474
+ ) -> object:
475
+ """
476
+ Stream build logs via Server-Sent Events (SSE).
477
+
478
+ Returns a streaming response with content-type text/event-stream. Each log line
479
+ is sent as an SSE data event.
480
+
481
+ Args:
482
+ extra_headers: Send extra headers
483
+
484
+ extra_query: Add additional query parameters to the request
485
+
486
+ extra_body: Add additional JSON properties to the request
487
+
488
+ timeout: Override the client-level default timeout for this request, in seconds
489
+ """
490
+ if not build_id:
491
+ raise ValueError(f"Expected a non-empty value for `build_id` but received {build_id!r}")
492
+ return await self._get(
493
+ f"/v5/builds/{build_id}/logs",
494
+ options=make_request_options(
495
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
496
+ ),
497
+ cast_to=object,
498
+ )
499
+
500
+
501
+ class BuildResourceWithRawResponse:
502
+ def __init__(self, build: BuildResource) -> None:
503
+ self._build = build
504
+
505
+ self.create = to_raw_response_wrapper(
506
+ build.create,
507
+ )
508
+ self.retrieve = to_raw_response_wrapper(
509
+ build.retrieve,
510
+ )
511
+ self.list = to_raw_response_wrapper(
512
+ build.list,
513
+ )
514
+ self.cancel = to_raw_response_wrapper(
515
+ build.cancel,
516
+ )
517
+ self.logs = to_raw_response_wrapper(
518
+ build.logs,
519
+ )
520
+
521
+
522
+ class AsyncBuildResourceWithRawResponse:
523
+ def __init__(self, build: AsyncBuildResource) -> None:
524
+ self._build = build
525
+
526
+ self.create = async_to_raw_response_wrapper(
527
+ build.create,
528
+ )
529
+ self.retrieve = async_to_raw_response_wrapper(
530
+ build.retrieve,
531
+ )
532
+ self.list = async_to_raw_response_wrapper(
533
+ build.list,
534
+ )
535
+ self.cancel = async_to_raw_response_wrapper(
536
+ build.cancel,
537
+ )
538
+ self.logs = async_to_raw_response_wrapper(
539
+ build.logs,
540
+ )
541
+
542
+
543
+ class BuildResourceWithStreamingResponse:
544
+ def __init__(self, build: BuildResource) -> None:
545
+ self._build = build
546
+
547
+ self.create = to_streamed_response_wrapper(
548
+ build.create,
549
+ )
550
+ self.retrieve = to_streamed_response_wrapper(
551
+ build.retrieve,
552
+ )
553
+ self.list = to_streamed_response_wrapper(
554
+ build.list,
555
+ )
556
+ self.cancel = to_streamed_response_wrapper(
557
+ build.cancel,
558
+ )
559
+ self.logs = to_streamed_response_wrapper(
560
+ build.logs,
561
+ )
562
+
563
+
564
+ class AsyncBuildResourceWithStreamingResponse:
565
+ def __init__(self, build: AsyncBuildResource) -> None:
566
+ self._build = build
567
+
568
+ self.create = async_to_streamed_response_wrapper(
569
+ build.create,
570
+ )
571
+ self.retrieve = async_to_streamed_response_wrapper(
572
+ build.retrieve,
573
+ )
574
+ self.list = async_to_streamed_response_wrapper(
575
+ build.list,
576
+ )
577
+ self.cancel = async_to_streamed_response_wrapper(
578
+ build.cancel,
579
+ )
580
+ self.logs = async_to_streamed_response_wrapper(
581
+ build.logs,
582
+ )
@@ -28,6 +28,7 @@ from .evaluation_task import EvaluationTask as EvaluationTask
28
28
  from .inference_model import InferenceModel as InferenceModel
29
29
  from .span_assessment import SpanAssessment as SpanAssessment
30
30
  from .file_list_params import FileListParams as FileListParams
31
+ from .build_list_params import BuildListParams as BuildListParams
31
32
  from .credential_secret import CredentialSecret as CredentialSecret
32
33
  from .model_list_params import ModelListParams as ModelListParams
33
34
  from .span_batch_params import SpanBatchParams as SpanBatchParams
@@ -37,12 +38,16 @@ from .inference_response import InferenceResponse as InferenceResponse
37
38
  from .span_create_params import SpanCreateParams as SpanCreateParams
38
39
  from .span_search_params import SpanSearchParams as SpanSearchParams
39
40
  from .span_update_params import SpanUpdateParams as SpanUpdateParams
41
+ from .build_create_params import BuildCreateParams as BuildCreateParams
42
+ from .build_list_response import BuildListResponse as BuildListResponse
40
43
  from .dataset_list_params import DatasetListParams as DatasetListParams
41
44
  from .model_create_params import ModelCreateParams as ModelCreateParams
42
45
  from .model_update_params import ModelUpdateParams as ModelUpdateParams
43
46
  from .span_batch_response import SpanBatchResponse as SpanBatchResponse
44
47
  from .file_delete_response import FileDeleteResponse as FileDeleteResponse
45
48
  from .question_list_params import QuestionListParams as QuestionListParams
49
+ from .build_cancel_response import BuildCancelResponse as BuildCancelResponse
50
+ from .build_create_response import BuildCreateResponse as BuildCreateResponse
46
51
  from .dataset_create_params import DatasetCreateParams as DatasetCreateParams
47
52
  from .dataset_update_params import DatasetUpdateParams as DatasetUpdateParams
48
53
  from .evaluation_task_param import EvaluationTaskParam as EvaluationTaskParam
@@ -52,6 +57,7 @@ from .credential_list_params import CredentialListParams as CredentialListParams
52
57
  from .evaluation_list_params import EvaluationListParams as EvaluationListParams
53
58
  from .question_create_params import QuestionCreateParams as QuestionCreateParams
54
59
  from .response_create_params import ResponseCreateParams as ResponseCreateParams
60
+ from .build_retrieve_response import BuildRetrieveResponse as BuildRetrieveResponse
55
61
  from .dataset_delete_response import DatasetDeleteResponse as DatasetDeleteResponse
56
62
  from .dataset_retrieve_params import DatasetRetrieveParams as DatasetRetrieveParams
57
63
  from .inference_create_params import InferenceCreateParams as InferenceCreateParams
@@ -0,0 +1,38 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+ from datetime import datetime
5
+ from typing_extensions import Literal
6
+
7
+ from .._models import BaseModel
8
+ from .shared.identity import Identity
9
+
10
+ __all__ = ["BuildCancelResponse"]
11
+
12
+
13
+ class BuildCancelResponse(BaseModel):
14
+ account_id: str
15
+
16
+ build_id: str
17
+
18
+ created_at: datetime
19
+
20
+ created_by: Identity
21
+ """The identity that created the entity."""
22
+
23
+ image_name: str
24
+
25
+ image_tag: str
26
+
27
+ image_url: str
28
+
29
+ status: str
30
+ """The current build status from the cloud provider"""
31
+
32
+ build_end_time: Optional[datetime] = None
33
+ """When the cloud provider finished the build"""
34
+
35
+ build_start_time: Optional[datetime] = None
36
+ """When the cloud provider started the build"""
37
+
38
+ object: Optional[Literal["agentex_cloud_build"]] = None
@@ -0,0 +1,26 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import Required, TypedDict
6
+
7
+ from .._types import FileTypes
8
+
9
+ __all__ = ["BuildCreateParams"]
10
+
11
+
12
+ class BuildCreateParams(TypedDict, total=False):
13
+ context_archive: Required[FileTypes]
14
+ """
15
+ tar.gz archive containing the build context (Dockerfile and any files needed for
16
+ the build)
17
+ """
18
+
19
+ image_name: Required[str]
20
+ """Name for the built image"""
21
+
22
+ build_args: str
23
+ """JSON string of build arguments"""
24
+
25
+ image_tag: str
26
+ """Tag for the built image"""