@gpuai/sdk 0.3.7 → 0.3.9
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.
- package/README.md +3 -2
- package/dist/apis/FineTuningApi.d.ts +17 -0
- package/dist/apis/FineTuningApi.js +48 -0
- package/dist/esm/apis/FineTuningApi.d.ts +17 -0
- package/dist/esm/apis/FineTuningApi.js +48 -0
- package/dist/esm/models/CreateInstanceRequest.d.ts +6 -0
- package/dist/esm/models/CreateInstanceRequest.js +2 -0
- package/dist/esm/models/Instance.d.ts +13 -1
- package/dist/esm/models/Instance.js +4 -0
- package/dist/esm/models/Model.d.ts +12 -0
- package/dist/esm/models/Model.js +4 -0
- package/dist/models/CreateInstanceRequest.d.ts +6 -0
- package/dist/models/CreateInstanceRequest.js +2 -0
- package/dist/models/Instance.d.ts +13 -1
- package/dist/models/Instance.js +4 -0
- package/dist/models/Model.d.ts +12 -0
- package/dist/models/Model.js +4 -0
- package/docs/CreateInstanceRequest.md +2 -0
- package/docs/FineTuningApi.md +77 -0
- package/docs/Instance.md +4 -0
- package/docs/Model.md +4 -0
- package/package.json +1 -1
- package/src/apis/FineTuningApi.ts +59 -0
- package/src/models/CreateInstanceRequest.ts +8 -0
- package/src/models/Instance.ts +17 -1
- package/src/models/Model.ts +16 -0
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @gpuai/sdk@0.3.
|
|
1
|
+
# @gpuai/sdk@0.3.9
|
|
2
2
|
|
|
3
3
|
A TypeScript SDK client for the api.gpu.ai API.
|
|
4
4
|
|
|
@@ -72,6 +72,7 @@ All URIs are relative to *https://api.gpu.ai/v1*
|
|
|
72
72
|
*FineTuningApi* | [**getFineTuningJob**](docs/FineTuningApi.md#getfinetuningjob) | **GET** /fine_tuning/jobs/{id} | Retrieve a fine-tuning job (OpenAI-compatible)
|
|
73
73
|
*FineTuningApi* | [**listFineTuningJobEvents**](docs/FineTuningApi.md#listfinetuningjobevents) | **GET** /fine_tuning/jobs/{id}/events | List fine-tuning job events (OpenAI-compatible)
|
|
74
74
|
*FineTuningApi* | [**listFineTuningJobs**](docs/FineTuningApi.md#listfinetuningjobs) | **GET** /fine_tuning/jobs | List fine-tuning jobs (OpenAI-compatible)
|
|
75
|
+
*FineTuningApi* | [**retrieveFile**](docs/FineTuningApi.md#retrievefile) | **GET** /files/{id} | Retrieve a file (OpenAI-compatible)
|
|
75
76
|
*GpuTypesApi* | [**listGpuTypes**](docs/GpuTypesApi.md#listgputypes) | **GET** /gpu-types | List available GPU types (no auth required)
|
|
76
77
|
*InferenceApi* | [**cancelVideo**](docs/InferenceApi.md#cancelvideo) | **POST** /videos/{id}/cancel | Cancel a video generation job
|
|
77
78
|
*InferenceApi* | [**createChatCompletion**](docs/InferenceApi.md#createchatcompletion) | **POST** /chat/completions | Create a chat completion (OpenAI-compatible)
|
|
@@ -203,7 +204,7 @@ and is automatically generated by the
|
|
|
203
204
|
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
204
205
|
|
|
205
206
|
- API version: `1.0.0`
|
|
206
|
-
- Package version: `0.3.
|
|
207
|
+
- Package version: `0.3.9`
|
|
207
208
|
- Generator version: `7.24.0`
|
|
208
209
|
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
209
210
|
|
|
@@ -37,6 +37,9 @@ export interface ListFineTuningJobsRequest {
|
|
|
37
37
|
after?: string;
|
|
38
38
|
limit?: number;
|
|
39
39
|
}
|
|
40
|
+
export interface RetrieveFileRequest {
|
|
41
|
+
id: string;
|
|
42
|
+
}
|
|
40
43
|
/**
|
|
41
44
|
*
|
|
42
45
|
*/
|
|
@@ -113,6 +116,20 @@ export declare class FineTuningApi extends runtime.BaseAPI {
|
|
|
113
116
|
* List fine-tuning jobs (OpenAI-compatible)
|
|
114
117
|
*/
|
|
115
118
|
listFineTuningJobs(requestParameters?: ListFineTuningJobsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FineTuningJobList>;
|
|
119
|
+
/**
|
|
120
|
+
* Creates request options for retrieveFile without sending the request
|
|
121
|
+
*/
|
|
122
|
+
retrieveFileRequestOpts(requestParameters: RetrieveFileRequest): Promise<runtime.RequestOpts>;
|
|
123
|
+
/**
|
|
124
|
+
* Returns the metadata for one of your uploaded files. The lookup is scoped to the organization the API key belongs to: a file id that does not exist and one that belongs to another organization both return the same 404, so this route cannot be used to probe for other tenants\' ids. Use it to check that a `training_file` is present and usable BEFORE creating a fine-tuning job — the create path performs the identical ownership check, so a file this route returns is a file that create will accept.
|
|
125
|
+
* Retrieve a file (OpenAI-compatible)
|
|
126
|
+
*/
|
|
127
|
+
retrieveFileRaw(requestParameters: RetrieveFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FileObject>>;
|
|
128
|
+
/**
|
|
129
|
+
* Returns the metadata for one of your uploaded files. The lookup is scoped to the organization the API key belongs to: a file id that does not exist and one that belongs to another organization both return the same 404, so this route cannot be used to probe for other tenants\' ids. Use it to check that a `training_file` is present and usable BEFORE creating a fine-tuning job — the create path performs the identical ownership check, so a file this route returns is a file that create will accept.
|
|
130
|
+
* Retrieve a file (OpenAI-compatible)
|
|
131
|
+
*/
|
|
132
|
+
retrieveFile(requestParameters: RetrieveFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FileObject>;
|
|
116
133
|
}
|
|
117
134
|
/**
|
|
118
135
|
* @export
|
|
@@ -342,6 +342,54 @@ class FineTuningApi extends runtime.BaseAPI {
|
|
|
342
342
|
return yield response.value();
|
|
343
343
|
});
|
|
344
344
|
}
|
|
345
|
+
/**
|
|
346
|
+
* Creates request options for retrieveFile without sending the request
|
|
347
|
+
*/
|
|
348
|
+
retrieveFileRequestOpts(requestParameters) {
|
|
349
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
350
|
+
if (requestParameters['id'] == null) {
|
|
351
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling retrieveFile().');
|
|
352
|
+
}
|
|
353
|
+
const queryParameters = {};
|
|
354
|
+
const headerParameters = {};
|
|
355
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
356
|
+
const token = this.configuration.accessToken;
|
|
357
|
+
const tokenString = yield token("bearerAuth", []);
|
|
358
|
+
if (tokenString) {
|
|
359
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
let urlPath = `/files/{id}`;
|
|
363
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
364
|
+
return {
|
|
365
|
+
path: urlPath,
|
|
366
|
+
method: 'GET',
|
|
367
|
+
headers: headerParameters,
|
|
368
|
+
query: queryParameters,
|
|
369
|
+
};
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* Returns the metadata for one of your uploaded files. The lookup is scoped to the organization the API key belongs to: a file id that does not exist and one that belongs to another organization both return the same 404, so this route cannot be used to probe for other tenants\' ids. Use it to check that a `training_file` is present and usable BEFORE creating a fine-tuning job — the create path performs the identical ownership check, so a file this route returns is a file that create will accept.
|
|
374
|
+
* Retrieve a file (OpenAI-compatible)
|
|
375
|
+
*/
|
|
376
|
+
retrieveFileRaw(requestParameters, initOverrides) {
|
|
377
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
378
|
+
const requestOptions = yield this.retrieveFileRequestOpts(requestParameters);
|
|
379
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
380
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, FileObject_1.FileObjectFromJSON)(jsonValue));
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* Returns the metadata for one of your uploaded files. The lookup is scoped to the organization the API key belongs to: a file id that does not exist and one that belongs to another organization both return the same 404, so this route cannot be used to probe for other tenants\' ids. Use it to check that a `training_file` is present and usable BEFORE creating a fine-tuning job — the create path performs the identical ownership check, so a file this route returns is a file that create will accept.
|
|
385
|
+
* Retrieve a file (OpenAI-compatible)
|
|
386
|
+
*/
|
|
387
|
+
retrieveFile(requestParameters, initOverrides) {
|
|
388
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
389
|
+
const response = yield this.retrieveFileRaw(requestParameters, initOverrides);
|
|
390
|
+
return yield response.value();
|
|
391
|
+
});
|
|
392
|
+
}
|
|
345
393
|
}
|
|
346
394
|
exports.FineTuningApi = FineTuningApi;
|
|
347
395
|
/**
|
|
@@ -37,6 +37,9 @@ export interface ListFineTuningJobsRequest {
|
|
|
37
37
|
after?: string;
|
|
38
38
|
limit?: number;
|
|
39
39
|
}
|
|
40
|
+
export interface RetrieveFileRequest {
|
|
41
|
+
id: string;
|
|
42
|
+
}
|
|
40
43
|
/**
|
|
41
44
|
*
|
|
42
45
|
*/
|
|
@@ -113,6 +116,20 @@ export declare class FineTuningApi extends runtime.BaseAPI {
|
|
|
113
116
|
* List fine-tuning jobs (OpenAI-compatible)
|
|
114
117
|
*/
|
|
115
118
|
listFineTuningJobs(requestParameters?: ListFineTuningJobsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FineTuningJobList>;
|
|
119
|
+
/**
|
|
120
|
+
* Creates request options for retrieveFile without sending the request
|
|
121
|
+
*/
|
|
122
|
+
retrieveFileRequestOpts(requestParameters: RetrieveFileRequest): Promise<runtime.RequestOpts>;
|
|
123
|
+
/**
|
|
124
|
+
* Returns the metadata for one of your uploaded files. The lookup is scoped to the organization the API key belongs to: a file id that does not exist and one that belongs to another organization both return the same 404, so this route cannot be used to probe for other tenants\' ids. Use it to check that a `training_file` is present and usable BEFORE creating a fine-tuning job — the create path performs the identical ownership check, so a file this route returns is a file that create will accept.
|
|
125
|
+
* Retrieve a file (OpenAI-compatible)
|
|
126
|
+
*/
|
|
127
|
+
retrieveFileRaw(requestParameters: RetrieveFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FileObject>>;
|
|
128
|
+
/**
|
|
129
|
+
* Returns the metadata for one of your uploaded files. The lookup is scoped to the organization the API key belongs to: a file id that does not exist and one that belongs to another organization both return the same 404, so this route cannot be used to probe for other tenants\' ids. Use it to check that a `training_file` is present and usable BEFORE creating a fine-tuning job — the create path performs the identical ownership check, so a file this route returns is a file that create will accept.
|
|
130
|
+
* Retrieve a file (OpenAI-compatible)
|
|
131
|
+
*/
|
|
132
|
+
retrieveFile(requestParameters: RetrieveFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FileObject>;
|
|
116
133
|
}
|
|
117
134
|
/**
|
|
118
135
|
* @export
|
|
@@ -339,6 +339,54 @@ export class FineTuningApi extends runtime.BaseAPI {
|
|
|
339
339
|
return yield response.value();
|
|
340
340
|
});
|
|
341
341
|
}
|
|
342
|
+
/**
|
|
343
|
+
* Creates request options for retrieveFile without sending the request
|
|
344
|
+
*/
|
|
345
|
+
retrieveFileRequestOpts(requestParameters) {
|
|
346
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
347
|
+
if (requestParameters['id'] == null) {
|
|
348
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling retrieveFile().');
|
|
349
|
+
}
|
|
350
|
+
const queryParameters = {};
|
|
351
|
+
const headerParameters = {};
|
|
352
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
353
|
+
const token = this.configuration.accessToken;
|
|
354
|
+
const tokenString = yield token("bearerAuth", []);
|
|
355
|
+
if (tokenString) {
|
|
356
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
let urlPath = `/files/{id}`;
|
|
360
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
361
|
+
return {
|
|
362
|
+
path: urlPath,
|
|
363
|
+
method: 'GET',
|
|
364
|
+
headers: headerParameters,
|
|
365
|
+
query: queryParameters,
|
|
366
|
+
};
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* Returns the metadata for one of your uploaded files. The lookup is scoped to the organization the API key belongs to: a file id that does not exist and one that belongs to another organization both return the same 404, so this route cannot be used to probe for other tenants\' ids. Use it to check that a `training_file` is present and usable BEFORE creating a fine-tuning job — the create path performs the identical ownership check, so a file this route returns is a file that create will accept.
|
|
371
|
+
* Retrieve a file (OpenAI-compatible)
|
|
372
|
+
*/
|
|
373
|
+
retrieveFileRaw(requestParameters, initOverrides) {
|
|
374
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
375
|
+
const requestOptions = yield this.retrieveFileRequestOpts(requestParameters);
|
|
376
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
377
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => FileObjectFromJSON(jsonValue));
|
|
378
|
+
});
|
|
379
|
+
}
|
|
380
|
+
/**
|
|
381
|
+
* Returns the metadata for one of your uploaded files. The lookup is scoped to the organization the API key belongs to: a file id that does not exist and one that belongs to another organization both return the same 404, so this route cannot be used to probe for other tenants\' ids. Use it to check that a `training_file` is present and usable BEFORE creating a fine-tuning job — the create path performs the identical ownership check, so a file this route returns is a file that create will accept.
|
|
382
|
+
* Retrieve a file (OpenAI-compatible)
|
|
383
|
+
*/
|
|
384
|
+
retrieveFile(requestParameters, initOverrides) {
|
|
385
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
386
|
+
const response = yield this.retrieveFileRaw(requestParameters, initOverrides);
|
|
387
|
+
return yield response.value();
|
|
388
|
+
});
|
|
389
|
+
}
|
|
342
390
|
}
|
|
343
391
|
/**
|
|
344
392
|
* @export
|
|
@@ -88,6 +88,12 @@ export interface CreateInstanceRequest {
|
|
|
88
88
|
* @memberof CreateInstanceRequest
|
|
89
89
|
*/
|
|
90
90
|
diskGb?: number;
|
|
91
|
+
/**
|
|
92
|
+
* Terminate this instance automatically after this many hours of runtime. Omit for no limit (the default). The countdown starts when the instance reaches `running`, not when you call this — provisioning is neither billed nor counted against the limit — and the resolved deadline is returned as `auto_terminate_at` on every read. Enforcement is server-side and survives your process: this is the safety net for an unattended run whose client dies without cleaning up. When it fires the instance is terminated exactly as a DELETE would terminate it (billing stops, the `instance.terminated` webhook fires) and `status_reason` records that the limit was reached. Bounds: at least 1, at most 720 (30 days) — outside them returns 422 `validation_failed`. An explicit `0` is rejected rather than read as "no limit"; omit the field for that.
|
|
93
|
+
* @type {number}
|
|
94
|
+
* @memberof CreateInstanceRequest
|
|
95
|
+
*/
|
|
96
|
+
autoTerminateHours?: number;
|
|
91
97
|
/**
|
|
92
98
|
* Environment variables. With `template_id`: per-deploy overrides — only keys the template marks user_overridable are accepted (others 422), and secret values are redacted from operation metadata. With `image`: plain container env vars — keys must be POSIX names and the platform's reserved namespace (`PUBLIC_KEY`, `GPUAI_*`) is refused (422).
|
|
93
99
|
* @type {{ [key: string]: string; }}
|
|
@@ -51,6 +51,7 @@ export function CreateInstanceRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
51
51
|
'environment': json['environment'] == null ? undefined : json['environment'],
|
|
52
52
|
'offeringId': json['offering_id'] == null ? undefined : json['offering_id'],
|
|
53
53
|
'diskGb': json['disk_gb'] == null ? undefined : json['disk_gb'],
|
|
54
|
+
'autoTerminateHours': json['auto_terminate_hours'] == null ? undefined : json['auto_terminate_hours'],
|
|
54
55
|
'env': json['env'] == null ? undefined : json['env'],
|
|
55
56
|
'image': json['image'] == null ? undefined : json['image'],
|
|
56
57
|
'registryCredentialId': json['registry_credential_id'] == null ? undefined : json['registry_credential_id'],
|
|
@@ -79,6 +80,7 @@ export function CreateInstanceRequestToJSONTyped(value, ignoreDiscriminator = fa
|
|
|
79
80
|
'environment': value['environment'],
|
|
80
81
|
'offering_id': value['offeringId'],
|
|
81
82
|
'disk_gb': value['diskGb'],
|
|
83
|
+
'auto_terminate_hours': value['autoTerminateHours'],
|
|
82
84
|
'env': value['env'],
|
|
83
85
|
'image': value['image'],
|
|
84
86
|
'registry_credential_id': value['registryCredentialId'],
|
|
@@ -83,7 +83,19 @@ export interface Instance {
|
|
|
83
83
|
*/
|
|
84
84
|
image?: string;
|
|
85
85
|
/**
|
|
86
|
-
*
|
|
86
|
+
* The runtime limit this instance was launched with, in hours (the `auto_terminate_hours` you sent). Absent means the instance runs until something stops it. It stays present after the limit has fired, so a terminated instance still explains itself.
|
|
87
|
+
* @type {number}
|
|
88
|
+
* @memberof Instance
|
|
89
|
+
*/
|
|
90
|
+
autoTerminateHours?: number;
|
|
91
|
+
/**
|
|
92
|
+
* When the runtime limit expires and the platform terminates this instance. Computed when the instance became running (ready_at + auto_terminate_hours), so the countdown covers usable runtime, not the time spent provisioning. Absent when no limit was set, when the instance is not running yet, or once the platform has begun acting on an elapsed limit.
|
|
93
|
+
* @type {Date}
|
|
94
|
+
* @memberof Instance
|
|
95
|
+
*/
|
|
96
|
+
autoTerminateAt?: Date;
|
|
97
|
+
/**
|
|
98
|
+
* Why the instance stopped or failed, e.g. "provisioning stalled: the instance started but never became reachable", or — when a runtime limit fired — "Terminated: this instance reached the 8-hour runtime limit set at launch". Present only when the platform has something to explain.
|
|
87
99
|
* @type {string}
|
|
88
100
|
* @memberof Instance
|
|
89
101
|
*/
|
|
@@ -73,6 +73,8 @@ export function InstanceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
73
73
|
'connection': json['connection'] == null ? undefined : InstanceConnectionFromJSON(json['connection']),
|
|
74
74
|
'diskGb': json['disk_gb'] == null ? undefined : json['disk_gb'],
|
|
75
75
|
'image': json['image'] == null ? undefined : json['image'],
|
|
76
|
+
'autoTerminateHours': json['auto_terminate_hours'] == null ? undefined : json['auto_terminate_hours'],
|
|
77
|
+
'autoTerminateAt': json['auto_terminate_at'] == null ? undefined : (new Date(json['auto_terminate_at'])),
|
|
76
78
|
'statusReason': json['status_reason'] == null ? undefined : json['status_reason'],
|
|
77
79
|
'createdAt': (new Date(json['created_at'])),
|
|
78
80
|
'readyAt': json['ready_at'] == null ? undefined : (new Date(json['ready_at'])),
|
|
@@ -100,6 +102,8 @@ export function InstanceToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
100
102
|
'connection': InstanceConnectionToJSON(value['connection']),
|
|
101
103
|
'disk_gb': value['diskGb'],
|
|
102
104
|
'image': value['image'],
|
|
105
|
+
'auto_terminate_hours': value['autoTerminateHours'],
|
|
106
|
+
'auto_terminate_at': value['autoTerminateAt'] == null ? value['autoTerminateAt'] : value['autoTerminateAt'].toISOString(),
|
|
103
107
|
'status_reason': value['statusReason'],
|
|
104
108
|
'created_at': value['createdAt'].toISOString(),
|
|
105
109
|
'ready_at': value['readyAt'] == null ? value['readyAt'] : value['readyAt'].toISOString(),
|
|
@@ -89,6 +89,18 @@ export interface Model {
|
|
|
89
89
|
* @memberof Model
|
|
90
90
|
*/
|
|
91
91
|
aliases?: Array<string>;
|
|
92
|
+
/**
|
|
93
|
+
* Whether this model can be used as the base of a managed fine-tuning job. The tunable allowlist is operator-curated and much narrower than the serving catalog, so this is false for almost every model. Absent means false.
|
|
94
|
+
* @type {boolean}
|
|
95
|
+
* @memberof Model
|
|
96
|
+
*/
|
|
97
|
+
fineTunable?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* The exact id to send as `model` when creating a fine-tuning job for this entry. Present only when `fine_tunable` is true, and deliberately distinct from `id`: the allowlist matches the customer-facing base id (e.g. `qwen2.5-7b-instruct`), which a served model normally carries as an alias rather than as its namespaced catalog id.
|
|
100
|
+
* @type {string}
|
|
101
|
+
* @memberof Model
|
|
102
|
+
*/
|
|
103
|
+
fineTuneBaseModel?: string;
|
|
92
104
|
/**
|
|
93
105
|
*
|
|
94
106
|
* @type {ModelStatusEnum}
|
package/dist/esm/models/Model.js
CHANGED
|
@@ -75,6 +75,8 @@ export function ModelFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
75
75
|
'parameters': json['parameters'] == null ? undefined : (json['parameters'].map(ModelParametersInnerFromJSON)),
|
|
76
76
|
'pricing': ModelPricingFromJSON(json['pricing']),
|
|
77
77
|
'aliases': json['aliases'] == null ? undefined : json['aliases'],
|
|
78
|
+
'fineTunable': json['fine_tunable'] == null ? undefined : json['fine_tunable'],
|
|
79
|
+
'fineTuneBaseModel': json['fine_tune_base_model'] == null ? undefined : json['fine_tune_base_model'],
|
|
78
80
|
'status': json['status'],
|
|
79
81
|
};
|
|
80
82
|
}
|
|
@@ -98,6 +100,8 @@ export function ModelToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
98
100
|
'parameters': value['parameters'] == null ? undefined : (value['parameters'].map(ModelParametersInnerToJSON)),
|
|
99
101
|
'pricing': ModelPricingToJSON(value['pricing']),
|
|
100
102
|
'aliases': value['aliases'],
|
|
103
|
+
'fine_tunable': value['fineTunable'],
|
|
104
|
+
'fine_tune_base_model': value['fineTuneBaseModel'],
|
|
101
105
|
'status': value['status'],
|
|
102
106
|
};
|
|
103
107
|
}
|
|
@@ -88,6 +88,12 @@ export interface CreateInstanceRequest {
|
|
|
88
88
|
* @memberof CreateInstanceRequest
|
|
89
89
|
*/
|
|
90
90
|
diskGb?: number;
|
|
91
|
+
/**
|
|
92
|
+
* Terminate this instance automatically after this many hours of runtime. Omit for no limit (the default). The countdown starts when the instance reaches `running`, not when you call this — provisioning is neither billed nor counted against the limit — and the resolved deadline is returned as `auto_terminate_at` on every read. Enforcement is server-side and survives your process: this is the safety net for an unattended run whose client dies without cleaning up. When it fires the instance is terminated exactly as a DELETE would terminate it (billing stops, the `instance.terminated` webhook fires) and `status_reason` records that the limit was reached. Bounds: at least 1, at most 720 (30 days) — outside them returns 422 `validation_failed`. An explicit `0` is rejected rather than read as "no limit"; omit the field for that.
|
|
93
|
+
* @type {number}
|
|
94
|
+
* @memberof CreateInstanceRequest
|
|
95
|
+
*/
|
|
96
|
+
autoTerminateHours?: number;
|
|
91
97
|
/**
|
|
92
98
|
* Environment variables. With `template_id`: per-deploy overrides — only keys the template marks user_overridable are accepted (others 422), and secret values are redacted from operation metadata. With `image`: plain container env vars — keys must be POSIX names and the platform's reserved namespace (`PUBLIC_KEY`, `GPUAI_*`) is refused (422).
|
|
93
99
|
* @type {{ [key: string]: string; }}
|
|
@@ -59,6 +59,7 @@ function CreateInstanceRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
59
59
|
'environment': json['environment'] == null ? undefined : json['environment'],
|
|
60
60
|
'offeringId': json['offering_id'] == null ? undefined : json['offering_id'],
|
|
61
61
|
'diskGb': json['disk_gb'] == null ? undefined : json['disk_gb'],
|
|
62
|
+
'autoTerminateHours': json['auto_terminate_hours'] == null ? undefined : json['auto_terminate_hours'],
|
|
62
63
|
'env': json['env'] == null ? undefined : json['env'],
|
|
63
64
|
'image': json['image'] == null ? undefined : json['image'],
|
|
64
65
|
'registryCredentialId': json['registry_credential_id'] == null ? undefined : json['registry_credential_id'],
|
|
@@ -87,6 +88,7 @@ function CreateInstanceRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
87
88
|
'environment': value['environment'],
|
|
88
89
|
'offering_id': value['offeringId'],
|
|
89
90
|
'disk_gb': value['diskGb'],
|
|
91
|
+
'auto_terminate_hours': value['autoTerminateHours'],
|
|
90
92
|
'env': value['env'],
|
|
91
93
|
'image': value['image'],
|
|
92
94
|
'registry_credential_id': value['registryCredentialId'],
|
|
@@ -83,7 +83,19 @@ export interface Instance {
|
|
|
83
83
|
*/
|
|
84
84
|
image?: string;
|
|
85
85
|
/**
|
|
86
|
-
*
|
|
86
|
+
* The runtime limit this instance was launched with, in hours (the `auto_terminate_hours` you sent). Absent means the instance runs until something stops it. It stays present after the limit has fired, so a terminated instance still explains itself.
|
|
87
|
+
* @type {number}
|
|
88
|
+
* @memberof Instance
|
|
89
|
+
*/
|
|
90
|
+
autoTerminateHours?: number;
|
|
91
|
+
/**
|
|
92
|
+
* When the runtime limit expires and the platform terminates this instance. Computed when the instance became running (ready_at + auto_terminate_hours), so the countdown covers usable runtime, not the time spent provisioning. Absent when no limit was set, when the instance is not running yet, or once the platform has begun acting on an elapsed limit.
|
|
93
|
+
* @type {Date}
|
|
94
|
+
* @memberof Instance
|
|
95
|
+
*/
|
|
96
|
+
autoTerminateAt?: Date;
|
|
97
|
+
/**
|
|
98
|
+
* Why the instance stopped or failed, e.g. "provisioning stalled: the instance started but never became reachable", or — when a runtime limit fired — "Terminated: this instance reached the 8-hour runtime limit set at launch". Present only when the platform has something to explain.
|
|
87
99
|
* @type {string}
|
|
88
100
|
* @memberof Instance
|
|
89
101
|
*/
|
package/dist/models/Instance.js
CHANGED
|
@@ -81,6 +81,8 @@ function InstanceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
81
81
|
'connection': json['connection'] == null ? undefined : (0, InstanceConnection_1.InstanceConnectionFromJSON)(json['connection']),
|
|
82
82
|
'diskGb': json['disk_gb'] == null ? undefined : json['disk_gb'],
|
|
83
83
|
'image': json['image'] == null ? undefined : json['image'],
|
|
84
|
+
'autoTerminateHours': json['auto_terminate_hours'] == null ? undefined : json['auto_terminate_hours'],
|
|
85
|
+
'autoTerminateAt': json['auto_terminate_at'] == null ? undefined : (new Date(json['auto_terminate_at'])),
|
|
84
86
|
'statusReason': json['status_reason'] == null ? undefined : json['status_reason'],
|
|
85
87
|
'createdAt': (new Date(json['created_at'])),
|
|
86
88
|
'readyAt': json['ready_at'] == null ? undefined : (new Date(json['ready_at'])),
|
|
@@ -108,6 +110,8 @@ function InstanceToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
108
110
|
'connection': (0, InstanceConnection_1.InstanceConnectionToJSON)(value['connection']),
|
|
109
111
|
'disk_gb': value['diskGb'],
|
|
110
112
|
'image': value['image'],
|
|
113
|
+
'auto_terminate_hours': value['autoTerminateHours'],
|
|
114
|
+
'auto_terminate_at': value['autoTerminateAt'] == null ? value['autoTerminateAt'] : value['autoTerminateAt'].toISOString(),
|
|
111
115
|
'status_reason': value['statusReason'],
|
|
112
116
|
'created_at': value['createdAt'].toISOString(),
|
|
113
117
|
'ready_at': value['readyAt'] == null ? value['readyAt'] : value['readyAt'].toISOString(),
|
package/dist/models/Model.d.ts
CHANGED
|
@@ -89,6 +89,18 @@ export interface Model {
|
|
|
89
89
|
* @memberof Model
|
|
90
90
|
*/
|
|
91
91
|
aliases?: Array<string>;
|
|
92
|
+
/**
|
|
93
|
+
* Whether this model can be used as the base of a managed fine-tuning job. The tunable allowlist is operator-curated and much narrower than the serving catalog, so this is false for almost every model. Absent means false.
|
|
94
|
+
* @type {boolean}
|
|
95
|
+
* @memberof Model
|
|
96
|
+
*/
|
|
97
|
+
fineTunable?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* The exact id to send as `model` when creating a fine-tuning job for this entry. Present only when `fine_tunable` is true, and deliberately distinct from `id`: the allowlist matches the customer-facing base id (e.g. `qwen2.5-7b-instruct`), which a served model normally carries as an alias rather than as its namespaced catalog id.
|
|
100
|
+
* @type {string}
|
|
101
|
+
* @memberof Model
|
|
102
|
+
*/
|
|
103
|
+
fineTuneBaseModel?: string;
|
|
92
104
|
/**
|
|
93
105
|
*
|
|
94
106
|
* @type {ModelStatusEnum}
|
package/dist/models/Model.js
CHANGED
|
@@ -83,6 +83,8 @@ function ModelFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
83
83
|
'parameters': json['parameters'] == null ? undefined : (json['parameters'].map(ModelParametersInner_1.ModelParametersInnerFromJSON)),
|
|
84
84
|
'pricing': (0, ModelPricing_1.ModelPricingFromJSON)(json['pricing']),
|
|
85
85
|
'aliases': json['aliases'] == null ? undefined : json['aliases'],
|
|
86
|
+
'fineTunable': json['fine_tunable'] == null ? undefined : json['fine_tunable'],
|
|
87
|
+
'fineTuneBaseModel': json['fine_tune_base_model'] == null ? undefined : json['fine_tune_base_model'],
|
|
86
88
|
'status': json['status'],
|
|
87
89
|
};
|
|
88
90
|
}
|
|
@@ -106,6 +108,8 @@ function ModelToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
106
108
|
'parameters': value['parameters'] == null ? undefined : (value['parameters'].map(ModelParametersInner_1.ModelParametersInnerToJSON)),
|
|
107
109
|
'pricing': (0, ModelPricing_1.ModelPricingToJSON)(value['pricing']),
|
|
108
110
|
'aliases': value['aliases'],
|
|
111
|
+
'fine_tunable': value['fineTunable'],
|
|
112
|
+
'fine_tune_base_model': value['fineTuneBaseModel'],
|
|
109
113
|
'status': value['status'],
|
|
110
114
|
};
|
|
111
115
|
}
|
|
@@ -18,6 +18,7 @@ Name | Type
|
|
|
18
18
|
`environment` | string
|
|
19
19
|
`offeringId` | string
|
|
20
20
|
`diskGb` | number
|
|
21
|
+
`autoTerminateHours` | number
|
|
21
22
|
`env` | { [key: string]: string; }
|
|
22
23
|
`image` | string
|
|
23
24
|
`registryCredentialId` | string
|
|
@@ -44,6 +45,7 @@ const example = {
|
|
|
44
45
|
"environment": certified:pytorch@2.13,
|
|
45
46
|
"offeringId": null,
|
|
46
47
|
"diskGb": 200,
|
|
48
|
+
"autoTerminateHours": 8,
|
|
47
49
|
"env": null,
|
|
48
50
|
"image": ghcr.io/acme/trainer:v1,
|
|
49
51
|
"registryCredentialId": null,
|
package/docs/FineTuningApi.md
CHANGED
|
@@ -10,6 +10,7 @@ All URIs are relative to *https://api.gpu.ai/v1*
|
|
|
10
10
|
| [**getFineTuningJob**](FineTuningApi.md#getfinetuningjob) | **GET** /fine_tuning/jobs/{id} | Retrieve a fine-tuning job (OpenAI-compatible) |
|
|
11
11
|
| [**listFineTuningJobEvents**](FineTuningApi.md#listfinetuningjobevents) | **GET** /fine_tuning/jobs/{id}/events | List fine-tuning job events (OpenAI-compatible) |
|
|
12
12
|
| [**listFineTuningJobs**](FineTuningApi.md#listfinetuningjobs) | **GET** /fine_tuning/jobs | List fine-tuning jobs (OpenAI-compatible) |
|
|
13
|
+
| [**retrieveFile**](FineTuningApi.md#retrievefile) | **GET** /files/{id} | Retrieve a file (OpenAI-compatible) |
|
|
13
14
|
|
|
14
15
|
|
|
15
16
|
|
|
@@ -466,3 +467,79 @@ example().catch(console.error);
|
|
|
466
467
|
|
|
467
468
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
468
469
|
|
|
470
|
+
|
|
471
|
+
## retrieveFile
|
|
472
|
+
|
|
473
|
+
> FileObject retrieveFile(id)
|
|
474
|
+
|
|
475
|
+
Retrieve a file (OpenAI-compatible)
|
|
476
|
+
|
|
477
|
+
Returns the metadata for one of your uploaded files. The lookup is scoped to the organization the API key belongs to: a file id that does not exist and one that belongs to another organization both return the same 404, so this route cannot be used to probe for other tenants\' ids. Use it to check that a `training_file` is present and usable BEFORE creating a fine-tuning job — the create path performs the identical ownership check, so a file this route returns is a file that create will accept.
|
|
478
|
+
|
|
479
|
+
### Example
|
|
480
|
+
|
|
481
|
+
```ts
|
|
482
|
+
import {
|
|
483
|
+
Configuration,
|
|
484
|
+
FineTuningApi,
|
|
485
|
+
} from '@gpuai/sdk';
|
|
486
|
+
import type { RetrieveFileRequest } from '@gpuai/sdk';
|
|
487
|
+
|
|
488
|
+
async function example() {
|
|
489
|
+
console.log("🚀 Testing @gpuai/sdk SDK...");
|
|
490
|
+
const config = new Configuration({
|
|
491
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
492
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
493
|
+
});
|
|
494
|
+
const api = new FineTuningApi(config);
|
|
495
|
+
|
|
496
|
+
const body = {
|
|
497
|
+
// string | The file id returned by the upload, e.g. `file-9f2c1a...`.
|
|
498
|
+
id: id_example,
|
|
499
|
+
} satisfies RetrieveFileRequest;
|
|
500
|
+
|
|
501
|
+
try {
|
|
502
|
+
const data = await api.retrieveFile(body);
|
|
503
|
+
console.log(data);
|
|
504
|
+
} catch (error) {
|
|
505
|
+
console.error(error);
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
// Run the test
|
|
510
|
+
example().catch(console.error);
|
|
511
|
+
```
|
|
512
|
+
|
|
513
|
+
### Parameters
|
|
514
|
+
|
|
515
|
+
|
|
516
|
+
| Name | Type | Description | Notes |
|
|
517
|
+
|------------- | ------------- | ------------- | -------------|
|
|
518
|
+
| **id** | `string` | The file id returned by the upload, e.g. `file-9f2c1a...`. | [Defaults to `undefined`] |
|
|
519
|
+
|
|
520
|
+
### Return type
|
|
521
|
+
|
|
522
|
+
[**FileObject**](FileObject.md)
|
|
523
|
+
|
|
524
|
+
### Authorization
|
|
525
|
+
|
|
526
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
527
|
+
|
|
528
|
+
### HTTP request headers
|
|
529
|
+
|
|
530
|
+
- **Content-Type**: Not defined
|
|
531
|
+
- **Accept**: `application/json`
|
|
532
|
+
|
|
533
|
+
|
|
534
|
+
### HTTP response details
|
|
535
|
+
| Status code | Description | Response headers |
|
|
536
|
+
|-------------|-------------|------------------|
|
|
537
|
+
| **200** | The file object. | - |
|
|
538
|
+
| **401** | Missing or invalid API key (OpenAI error envelope). | - |
|
|
539
|
+
| **403** | API key lacks the required scope (OpenAI error envelope). | - |
|
|
540
|
+
| **404** | Model or resource not found (OpenAI error envelope). | - |
|
|
541
|
+
| **429** | Rate limit exceeded (OpenAI error envelope). Retry-After header indicates seconds to wait. | * Retry-After - Seconds the client should wait before retrying. <br> |
|
|
542
|
+
| **500** | Internal server error (OpenAI error envelope). | - |
|
|
543
|
+
|
|
544
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
545
|
+
|
package/docs/Instance.md
CHANGED
|
@@ -17,6 +17,8 @@ Name | Type
|
|
|
17
17
|
`connection` | [InstanceConnection](InstanceConnection.md)
|
|
18
18
|
`diskGb` | number
|
|
19
19
|
`image` | string
|
|
20
|
+
`autoTerminateHours` | number
|
|
21
|
+
`autoTerminateAt` | Date
|
|
20
22
|
`statusReason` | string
|
|
21
23
|
`createdAt` | Date
|
|
22
24
|
`readyAt` | Date
|
|
@@ -42,6 +44,8 @@ const example = {
|
|
|
42
44
|
"connection": null,
|
|
43
45
|
"diskGb": null,
|
|
44
46
|
"image": null,
|
|
47
|
+
"autoTerminateHours": 8,
|
|
48
|
+
"autoTerminateAt": null,
|
|
45
49
|
"statusReason": null,
|
|
46
50
|
"createdAt": null,
|
|
47
51
|
"readyAt": null,
|
package/docs/Model.md
CHANGED
|
@@ -18,6 +18,8 @@ Name | Type
|
|
|
18
18
|
`parameters` | [Array<ModelParametersInner>](ModelParametersInner.md)
|
|
19
19
|
`pricing` | [ModelPricing](ModelPricing.md)
|
|
20
20
|
`aliases` | Array<string>
|
|
21
|
+
`fineTunable` | boolean
|
|
22
|
+
`fineTuneBaseModel` | string
|
|
21
23
|
`status` | string
|
|
22
24
|
|
|
23
25
|
## Example
|
|
@@ -39,6 +41,8 @@ const example = {
|
|
|
39
41
|
"parameters": null,
|
|
40
42
|
"pricing": null,
|
|
41
43
|
"aliases": null,
|
|
44
|
+
"fineTunable": null,
|
|
45
|
+
"fineTuneBaseModel": null,
|
|
42
46
|
"status": null,
|
|
43
47
|
} satisfies Model
|
|
44
48
|
|
package/package.json
CHANGED
|
@@ -72,6 +72,10 @@ export interface ListFineTuningJobsRequest {
|
|
|
72
72
|
limit?: number;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
+
export interface RetrieveFileRequest {
|
|
76
|
+
id: string;
|
|
77
|
+
}
|
|
78
|
+
|
|
75
79
|
/**
|
|
76
80
|
*
|
|
77
81
|
*/
|
|
@@ -436,6 +440,61 @@ export class FineTuningApi extends runtime.BaseAPI {
|
|
|
436
440
|
return await response.value();
|
|
437
441
|
}
|
|
438
442
|
|
|
443
|
+
/**
|
|
444
|
+
* Creates request options for retrieveFile without sending the request
|
|
445
|
+
*/
|
|
446
|
+
async retrieveFileRequestOpts(requestParameters: RetrieveFileRequest): Promise<runtime.RequestOpts> {
|
|
447
|
+
if (requestParameters['id'] == null) {
|
|
448
|
+
throw new runtime.RequiredError(
|
|
449
|
+
'id',
|
|
450
|
+
'Required parameter "id" was null or undefined when calling retrieveFile().'
|
|
451
|
+
);
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
const queryParameters: any = {};
|
|
455
|
+
|
|
456
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
457
|
+
|
|
458
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
459
|
+
const token = this.configuration.accessToken;
|
|
460
|
+
const tokenString = await token("bearerAuth", []);
|
|
461
|
+
|
|
462
|
+
if (tokenString) {
|
|
463
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
let urlPath = `/files/{id}`;
|
|
468
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
469
|
+
|
|
470
|
+
return {
|
|
471
|
+
path: urlPath,
|
|
472
|
+
method: 'GET',
|
|
473
|
+
headers: headerParameters,
|
|
474
|
+
query: queryParameters,
|
|
475
|
+
};
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
/**
|
|
479
|
+
* Returns the metadata for one of your uploaded files. The lookup is scoped to the organization the API key belongs to: a file id that does not exist and one that belongs to another organization both return the same 404, so this route cannot be used to probe for other tenants\' ids. Use it to check that a `training_file` is present and usable BEFORE creating a fine-tuning job — the create path performs the identical ownership check, so a file this route returns is a file that create will accept.
|
|
480
|
+
* Retrieve a file (OpenAI-compatible)
|
|
481
|
+
*/
|
|
482
|
+
async retrieveFileRaw(requestParameters: RetrieveFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FileObject>> {
|
|
483
|
+
const requestOptions = await this.retrieveFileRequestOpts(requestParameters);
|
|
484
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
485
|
+
|
|
486
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => FileObjectFromJSON(jsonValue));
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
/**
|
|
490
|
+
* Returns the metadata for one of your uploaded files. The lookup is scoped to the organization the API key belongs to: a file id that does not exist and one that belongs to another organization both return the same 404, so this route cannot be used to probe for other tenants\' ids. Use it to check that a `training_file` is present and usable BEFORE creating a fine-tuning job — the create path performs the identical ownership check, so a file this route returns is a file that create will accept.
|
|
491
|
+
* Retrieve a file (OpenAI-compatible)
|
|
492
|
+
*/
|
|
493
|
+
async retrieveFile(requestParameters: RetrieveFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FileObject> {
|
|
494
|
+
const response = await this.retrieveFileRaw(requestParameters, initOverrides);
|
|
495
|
+
return await response.value();
|
|
496
|
+
}
|
|
497
|
+
|
|
439
498
|
}
|
|
440
499
|
|
|
441
500
|
/**
|
|
@@ -99,6 +99,12 @@ export interface CreateInstanceRequest {
|
|
|
99
99
|
* @memberof CreateInstanceRequest
|
|
100
100
|
*/
|
|
101
101
|
diskGb?: number;
|
|
102
|
+
/**
|
|
103
|
+
* Terminate this instance automatically after this many hours of runtime. Omit for no limit (the default). The countdown starts when the instance reaches `running`, not when you call this — provisioning is neither billed nor counted against the limit — and the resolved deadline is returned as `auto_terminate_at` on every read. Enforcement is server-side and survives your process: this is the safety net for an unattended run whose client dies without cleaning up. When it fires the instance is terminated exactly as a DELETE would terminate it (billing stops, the `instance.terminated` webhook fires) and `status_reason` records that the limit was reached. Bounds: at least 1, at most 720 (30 days) — outside them returns 422 `validation_failed`. An explicit `0` is rejected rather than read as "no limit"; omit the field for that.
|
|
104
|
+
* @type {number}
|
|
105
|
+
* @memberof CreateInstanceRequest
|
|
106
|
+
*/
|
|
107
|
+
autoTerminateHours?: number;
|
|
102
108
|
/**
|
|
103
109
|
* Environment variables. With `template_id`: per-deploy overrides — only keys the template marks user_overridable are accepted (others 422), and secret values are redacted from operation metadata. With `image`: plain container env vars — keys must be POSIX names and the platform's reserved namespace (`PUBLIC_KEY`, `GPUAI_*`) is refused (422).
|
|
104
110
|
* @type {{ [key: string]: string; }}
|
|
@@ -180,6 +186,7 @@ export function CreateInstanceRequestFromJSONTyped(json: any, ignoreDiscriminato
|
|
|
180
186
|
'environment': json['environment'] == null ? undefined : json['environment'],
|
|
181
187
|
'offeringId': json['offering_id'] == null ? undefined : json['offering_id'],
|
|
182
188
|
'diskGb': json['disk_gb'] == null ? undefined : json['disk_gb'],
|
|
189
|
+
'autoTerminateHours': json['auto_terminate_hours'] == null ? undefined : json['auto_terminate_hours'],
|
|
183
190
|
'env': json['env'] == null ? undefined : json['env'],
|
|
184
191
|
'image': json['image'] == null ? undefined : json['image'],
|
|
185
192
|
'registryCredentialId': json['registry_credential_id'] == null ? undefined : json['registry_credential_id'],
|
|
@@ -212,6 +219,7 @@ export function CreateInstanceRequestToJSONTyped(value?: CreateInstanceRequest |
|
|
|
212
219
|
'environment': value['environment'],
|
|
213
220
|
'offering_id': value['offeringId'],
|
|
214
221
|
'disk_gb': value['diskGb'],
|
|
222
|
+
'auto_terminate_hours': value['autoTerminateHours'],
|
|
215
223
|
'env': value['env'],
|
|
216
224
|
'image': value['image'],
|
|
217
225
|
'registry_credential_id': value['registryCredentialId'],
|
package/src/models/Instance.ts
CHANGED
|
@@ -94,7 +94,19 @@ export interface Instance {
|
|
|
94
94
|
*/
|
|
95
95
|
image?: string;
|
|
96
96
|
/**
|
|
97
|
-
*
|
|
97
|
+
* The runtime limit this instance was launched with, in hours (the `auto_terminate_hours` you sent). Absent means the instance runs until something stops it. It stays present after the limit has fired, so a terminated instance still explains itself.
|
|
98
|
+
* @type {number}
|
|
99
|
+
* @memberof Instance
|
|
100
|
+
*/
|
|
101
|
+
autoTerminateHours?: number;
|
|
102
|
+
/**
|
|
103
|
+
* When the runtime limit expires and the platform terminates this instance. Computed when the instance became running (ready_at + auto_terminate_hours), so the countdown covers usable runtime, not the time spent provisioning. Absent when no limit was set, when the instance is not running yet, or once the platform has begun acting on an elapsed limit.
|
|
104
|
+
* @type {Date}
|
|
105
|
+
* @memberof Instance
|
|
106
|
+
*/
|
|
107
|
+
autoTerminateAt?: Date;
|
|
108
|
+
/**
|
|
109
|
+
* Why the instance stopped or failed, e.g. "provisioning stalled: the instance started but never became reachable", or — when a runtime limit fired — "Terminated: this instance reached the 8-hour runtime limit set at launch". Present only when the platform has something to explain.
|
|
98
110
|
* @type {string}
|
|
99
111
|
* @memberof Instance
|
|
100
112
|
*/
|
|
@@ -193,6 +205,8 @@ export function InstanceFromJSONTyped(json: any, ignoreDiscriminator: boolean):
|
|
|
193
205
|
'connection': json['connection'] == null ? undefined : InstanceConnectionFromJSON(json['connection']),
|
|
194
206
|
'diskGb': json['disk_gb'] == null ? undefined : json['disk_gb'],
|
|
195
207
|
'image': json['image'] == null ? undefined : json['image'],
|
|
208
|
+
'autoTerminateHours': json['auto_terminate_hours'] == null ? undefined : json['auto_terminate_hours'],
|
|
209
|
+
'autoTerminateAt': json['auto_terminate_at'] == null ? undefined : (new Date(json['auto_terminate_at'])),
|
|
196
210
|
'statusReason': json['status_reason'] == null ? undefined : json['status_reason'],
|
|
197
211
|
'createdAt': (new Date(json['created_at'])),
|
|
198
212
|
'readyAt': json['ready_at'] == null ? undefined : (new Date(json['ready_at'])),
|
|
@@ -224,6 +238,8 @@ export function InstanceToJSONTyped(value?: Instance | null, ignoreDiscriminator
|
|
|
224
238
|
'connection': InstanceConnectionToJSON(value['connection']),
|
|
225
239
|
'disk_gb': value['diskGb'],
|
|
226
240
|
'image': value['image'],
|
|
241
|
+
'auto_terminate_hours': value['autoTerminateHours'],
|
|
242
|
+
'auto_terminate_at': value['autoTerminateAt'] == null ? value['autoTerminateAt'] : value['autoTerminateAt'].toISOString(),
|
|
227
243
|
'status_reason': value['statusReason'],
|
|
228
244
|
'created_at': value['createdAt'].toISOString(),
|
|
229
245
|
'ready_at': value['readyAt'] == null ? value['readyAt'] : value['readyAt'].toISOString(),
|
package/src/models/Model.ts
CHANGED
|
@@ -106,6 +106,18 @@ export interface Model {
|
|
|
106
106
|
* @memberof Model
|
|
107
107
|
*/
|
|
108
108
|
aliases?: Array<string>;
|
|
109
|
+
/**
|
|
110
|
+
* Whether this model can be used as the base of a managed fine-tuning job. The tunable allowlist is operator-curated and much narrower than the serving catalog, so this is false for almost every model. Absent means false.
|
|
111
|
+
* @type {boolean}
|
|
112
|
+
* @memberof Model
|
|
113
|
+
*/
|
|
114
|
+
fineTunable?: boolean;
|
|
115
|
+
/**
|
|
116
|
+
* The exact id to send as `model` when creating a fine-tuning job for this entry. Present only when `fine_tunable` is true, and deliberately distinct from `id`: the allowlist matches the customer-facing base id (e.g. `qwen2.5-7b-instruct`), which a served model normally carries as an alias rather than as its namespaced catalog id.
|
|
117
|
+
* @type {string}
|
|
118
|
+
* @memberof Model
|
|
119
|
+
*/
|
|
120
|
+
fineTuneBaseModel?: string;
|
|
109
121
|
/**
|
|
110
122
|
*
|
|
111
123
|
* @type {ModelStatusEnum}
|
|
@@ -181,6 +193,8 @@ export function ModelFromJSONTyped(json: any, ignoreDiscriminator: boolean): Mod
|
|
|
181
193
|
'parameters': json['parameters'] == null ? undefined : ((json['parameters'] as Array<any>).map(ModelParametersInnerFromJSON)),
|
|
182
194
|
'pricing': ModelPricingFromJSON(json['pricing']),
|
|
183
195
|
'aliases': json['aliases'] == null ? undefined : json['aliases'],
|
|
196
|
+
'fineTunable': json['fine_tunable'] == null ? undefined : json['fine_tunable'],
|
|
197
|
+
'fineTuneBaseModel': json['fine_tune_base_model'] == null ? undefined : json['fine_tune_base_model'],
|
|
184
198
|
'status': json['status'],
|
|
185
199
|
};
|
|
186
200
|
}
|
|
@@ -208,6 +222,8 @@ export function ModelToJSONTyped(value?: Model | null, ignoreDiscriminator: bool
|
|
|
208
222
|
'parameters': value['parameters'] == null ? undefined : ((value['parameters'] as Array<any>).map(ModelParametersInnerToJSON)),
|
|
209
223
|
'pricing': ModelPricingToJSON(value['pricing']),
|
|
210
224
|
'aliases': value['aliases'],
|
|
225
|
+
'fine_tunable': value['fineTunable'],
|
|
226
|
+
'fine_tune_base_model': value['fineTuneBaseModel'],
|
|
211
227
|
'status': value['status'],
|
|
212
228
|
};
|
|
213
229
|
}
|