@gpuai/sdk 0.5.4 → 0.5.6
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/.openapi-generator/FILES +56 -0
- package/README.md +50 -2
- package/dist/apis/EndpointsApi.d.ts +150 -0
- package/dist/apis/EndpointsApi.js +379 -0
- package/dist/apis/InstancesApi.d.ts +15 -0
- package/dist/apis/InstancesApi.js +45 -0
- package/dist/apis/JobsApi.d.ts +172 -0
- package/dist/apis/JobsApi.js +444 -0
- package/dist/apis/OperationsApi.d.ts +17 -0
- package/dist/apis/OperationsApi.js +48 -0
- package/dist/apis/SecretsApi.d.ts +123 -0
- package/dist/apis/SecretsApi.js +328 -0
- package/dist/apis/index.d.ts +3 -0
- package/dist/apis/index.js +3 -0
- package/dist/esm/apis/EndpointsApi.d.ts +150 -0
- package/dist/esm/apis/EndpointsApi.js +375 -0
- package/dist/esm/apis/InstancesApi.d.ts +15 -0
- package/dist/esm/apis/InstancesApi.js +45 -0
- package/dist/esm/apis/JobsApi.d.ts +172 -0
- package/dist/esm/apis/JobsApi.js +440 -0
- package/dist/esm/apis/OperationsApi.d.ts +17 -0
- package/dist/esm/apis/OperationsApi.js +48 -0
- package/dist/esm/apis/SecretsApi.d.ts +123 -0
- package/dist/esm/apis/SecretsApi.js +324 -0
- package/dist/esm/apis/index.d.ts +3 -0
- package/dist/esm/apis/index.js +3 -0
- package/dist/esm/models/DedicatedIPOffer.d.ts +98 -0
- package/dist/esm/models/DedicatedIPOffer.js +87 -0
- package/dist/esm/models/Endpoint.d.ts +147 -0
- package/dist/esm/models/Endpoint.js +121 -0
- package/dist/esm/models/EndpointCreate.d.ts +80 -0
- package/dist/esm/models/EndpointCreate.js +63 -0
- package/dist/esm/models/EndpointList.d.ts +33 -0
- package/dist/esm/models/EndpointList.js +44 -0
- package/dist/esm/models/EndpointMachine.d.ts +90 -0
- package/dist/esm/models/EndpointMachine.js +84 -0
- package/dist/esm/models/EndpointReplicaCounts.d.ts +38 -0
- package/dist/esm/models/EndpointReplicaCounts.js +47 -0
- package/dist/esm/models/Job.d.ts +352 -0
- package/dist/esm/models/Job.js +254 -0
- package/dist/esm/models/JobAttempt.d.ts +176 -0
- package/dist/esm/models/JobAttempt.js +147 -0
- package/dist/esm/models/JobCreate.d.ts +153 -0
- package/dist/esm/models/JobCreate.js +84 -0
- package/dist/esm/models/JobGpuTypes.d.ts +39 -0
- package/dist/esm/models/JobGpuTypes.js +48 -0
- package/dist/esm/models/JobGpuTypesDataInner.d.ts +58 -0
- package/dist/esm/models/JobGpuTypesDataInner.js +59 -0
- package/dist/esm/models/JobLogChunk.d.ts +50 -0
- package/dist/esm/models/JobLogChunk.js +55 -0
- package/dist/esm/models/JobLogs.d.ts +39 -0
- package/dist/esm/models/JobLogs.js +48 -0
- package/dist/esm/models/JobPage.d.ts +39 -0
- package/dist/esm/models/JobPage.js +48 -0
- package/dist/esm/models/JobSharingHint.d.ts +46 -0
- package/dist/esm/models/JobSharingHint.js +51 -0
- package/dist/esm/models/JobTelemetry.d.ts +51 -0
- package/dist/esm/models/JobTelemetry.js +56 -0
- package/dist/esm/models/JobTelemetryPoint.d.ts +56 -0
- package/dist/esm/models/JobTelemetryPoint.js +59 -0
- package/dist/esm/models/JobTrial.d.ts +79 -0
- package/dist/esm/models/JobTrial.js +73 -0
- package/dist/esm/models/Operation.d.ts +6 -0
- package/dist/esm/models/Operation.js +2 -0
- package/dist/esm/models/Secret.d.ts +62 -0
- package/dist/esm/models/Secret.js +63 -0
- package/dist/esm/models/SecretCreate.d.ts +44 -0
- package/dist/esm/models/SecretCreate.js +49 -0
- package/dist/esm/models/SecretImportItem.d.ts +38 -0
- package/dist/esm/models/SecretImportItem.js +47 -0
- package/dist/esm/models/SecretImportRequest.d.ts +39 -0
- package/dist/esm/models/SecretImportRequest.js +46 -0
- package/dist/esm/models/SecretImportResult.d.ts +44 -0
- package/dist/esm/models/SecretImportResult.js +51 -0
- package/dist/esm/models/SecretList.d.ts +33 -0
- package/dist/esm/models/SecretList.js +44 -0
- package/dist/esm/models/SecretPut.d.ts +38 -0
- package/dist/esm/models/SecretPut.js +45 -0
- package/dist/esm/models/index.d.ts +25 -0
- package/dist/esm/models/index.js +25 -0
- package/dist/esm/runtime.js +1 -1
- package/dist/models/DedicatedIPOffer.d.ts +98 -0
- package/dist/models/DedicatedIPOffer.js +94 -0
- package/dist/models/Endpoint.d.ts +147 -0
- package/dist/models/Endpoint.js +129 -0
- package/dist/models/EndpointCreate.d.ts +80 -0
- package/dist/models/EndpointCreate.js +70 -0
- package/dist/models/EndpointList.d.ts +33 -0
- package/dist/models/EndpointList.js +51 -0
- package/dist/models/EndpointMachine.d.ts +90 -0
- package/dist/models/EndpointMachine.js +92 -0
- package/dist/models/EndpointReplicaCounts.d.ts +38 -0
- package/dist/models/EndpointReplicaCounts.js +54 -0
- package/dist/models/Job.d.ts +352 -0
- package/dist/models/Job.js +262 -0
- package/dist/models/JobAttempt.d.ts +176 -0
- package/dist/models/JobAttempt.js +155 -0
- package/dist/models/JobCreate.d.ts +153 -0
- package/dist/models/JobCreate.js +92 -0
- package/dist/models/JobGpuTypes.d.ts +39 -0
- package/dist/models/JobGpuTypes.js +55 -0
- package/dist/models/JobGpuTypesDataInner.d.ts +58 -0
- package/dist/models/JobGpuTypesDataInner.js +66 -0
- package/dist/models/JobLogChunk.d.ts +50 -0
- package/dist/models/JobLogChunk.js +62 -0
- package/dist/models/JobLogs.d.ts +39 -0
- package/dist/models/JobLogs.js +55 -0
- package/dist/models/JobPage.d.ts +39 -0
- package/dist/models/JobPage.js +55 -0
- package/dist/models/JobSharingHint.d.ts +46 -0
- package/dist/models/JobSharingHint.js +58 -0
- package/dist/models/JobTelemetry.d.ts +51 -0
- package/dist/models/JobTelemetry.js +63 -0
- package/dist/models/JobTelemetryPoint.d.ts +56 -0
- package/dist/models/JobTelemetryPoint.js +66 -0
- package/dist/models/JobTrial.d.ts +79 -0
- package/dist/models/JobTrial.js +81 -0
- package/dist/models/Operation.d.ts +6 -0
- package/dist/models/Operation.js +2 -0
- package/dist/models/Secret.d.ts +62 -0
- package/dist/models/Secret.js +70 -0
- package/dist/models/SecretCreate.d.ts +44 -0
- package/dist/models/SecretCreate.js +56 -0
- package/dist/models/SecretImportItem.d.ts +38 -0
- package/dist/models/SecretImportItem.js +54 -0
- package/dist/models/SecretImportRequest.d.ts +39 -0
- package/dist/models/SecretImportRequest.js +53 -0
- package/dist/models/SecretImportResult.d.ts +44 -0
- package/dist/models/SecretImportResult.js +58 -0
- package/dist/models/SecretList.d.ts +33 -0
- package/dist/models/SecretList.js +51 -0
- package/dist/models/SecretPut.d.ts +38 -0
- package/dist/models/SecretPut.js +52 -0
- package/dist/models/index.d.ts +25 -0
- package/dist/models/index.js +25 -0
- package/dist/runtime.js +1 -1
- package/docs/DedicatedIPOffer.md +56 -0
- package/docs/Endpoint.md +68 -0
- package/docs/EndpointCreate.md +50 -0
- package/docs/EndpointList.md +34 -0
- package/docs/EndpointMachine.md +50 -0
- package/docs/EndpointReplicaCounts.md +36 -0
- package/docs/EndpointsApi.md +544 -0
- package/docs/InstancesApi.md +68 -1
- package/docs/Job.md +125 -0
- package/docs/JobAttempt.md +69 -0
- package/docs/JobCreate.md +66 -0
- package/docs/JobGpuTypes.md +36 -0
- package/docs/JobGpuTypesDataInner.md +42 -0
- package/docs/JobLogChunk.md +40 -0
- package/docs/JobLogs.md +36 -0
- package/docs/JobPage.md +36 -0
- package/docs/JobSharingHint.md +39 -0
- package/docs/JobTelemetry.md +40 -0
- package/docs/JobTelemetryPoint.md +42 -0
- package/docs/JobTrial.md +46 -0
- package/docs/JobsApi.md +609 -0
- package/docs/Operation.md +2 -0
- package/docs/OperationsApi.md +76 -0
- package/docs/Secret.md +45 -0
- package/docs/SecretCreate.md +38 -0
- package/docs/SecretImportItem.md +36 -0
- package/docs/SecretImportRequest.md +36 -0
- package/docs/SecretImportResult.md +38 -0
- package/docs/SecretList.md +34 -0
- package/docs/SecretPut.md +36 -0
- package/docs/SecretsApi.md +450 -0
- package/package.json +1 -1
- package/src/apis/EndpointsApi.ts +481 -0
- package/src/apis/InstancesApi.ts +52 -0
- package/src/apis/JobsApi.ts +551 -0
- package/src/apis/OperationsApi.ts +59 -0
- package/src/apis/SecretsApi.ts +413 -0
- package/src/apis/index.ts +3 -0
- package/src/models/DedicatedIPOffer.ts +165 -0
- package/src/models/Endpoint.ts +247 -0
- package/src/models/EndpointCreate.ts +132 -0
- package/src/models/EndpointList.ts +74 -0
- package/src/models/EndpointMachine.ts +151 -0
- package/src/models/EndpointReplicaCounts.ts +75 -0
- package/src/models/Job.ts +538 -0
- package/src/models/JobAttempt.ts +267 -0
- package/src/models/JobCreate.ts +221 -0
- package/src/models/JobGpuTypes.ts +83 -0
- package/src/models/JobGpuTypesDataInner.ts +104 -0
- package/src/models/JobLogChunk.ts +93 -0
- package/src/models/JobLogs.ts +83 -0
- package/src/models/JobPage.ts +83 -0
- package/src/models/JobSharingHint.ts +86 -0
- package/src/models/JobTelemetry.ts +101 -0
- package/src/models/JobTelemetryPoint.ts +102 -0
- package/src/models/JobTrial.ts +132 -0
- package/src/models/Operation.ts +8 -0
- package/src/models/Secret.ts +111 -0
- package/src/models/SecretCreate.ts +83 -0
- package/src/models/SecretImportItem.ts +75 -0
- package/src/models/SecretImportRequest.ts +82 -0
- package/src/models/SecretImportResult.ts +84 -0
- package/src/models/SecretList.ts +74 -0
- package/src/models/SecretPut.ts +74 -0
- package/src/models/index.ts +25 -0
- package/src/runtime.ts +1 -1
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GPU.ai Public Developer API
|
|
3
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: support@gpu.ai
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { EndpointMachine } from './EndpointMachine';
|
|
13
|
+
import type { EndpointReplicaCounts } from './EndpointReplicaCounts';
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @export
|
|
17
|
+
* @interface Endpoint
|
|
18
|
+
*/
|
|
19
|
+
export interface Endpoint {
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* @type {string}
|
|
23
|
+
* @memberof Endpoint
|
|
24
|
+
*/
|
|
25
|
+
id: string;
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @type {string}
|
|
29
|
+
* @memberof Endpoint
|
|
30
|
+
*/
|
|
31
|
+
name: string;
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @type {string}
|
|
35
|
+
* @memberof Endpoint
|
|
36
|
+
*/
|
|
37
|
+
model: string;
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @type {string}
|
|
41
|
+
* @memberof Endpoint
|
|
42
|
+
*/
|
|
43
|
+
gpuType: string;
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @type {EndpointStatusEnum}
|
|
47
|
+
* @memberof Endpoint
|
|
48
|
+
*/
|
|
49
|
+
status: EndpointStatusEnum;
|
|
50
|
+
/**
|
|
51
|
+
* OpenAI-compatible base URL. Set an OpenAI client's base_url to it and use a GPU.ai API key.
|
|
52
|
+
* @type {string}
|
|
53
|
+
* @memberof Endpoint
|
|
54
|
+
*/
|
|
55
|
+
url: string;
|
|
56
|
+
/**
|
|
57
|
+
*
|
|
58
|
+
* @type {number}
|
|
59
|
+
* @memberof Endpoint
|
|
60
|
+
*/
|
|
61
|
+
minReplicas: number;
|
|
62
|
+
/**
|
|
63
|
+
*
|
|
64
|
+
* @type {number}
|
|
65
|
+
* @memberof Endpoint
|
|
66
|
+
*/
|
|
67
|
+
maxReplicas: number;
|
|
68
|
+
/**
|
|
69
|
+
*
|
|
70
|
+
* @type {number}
|
|
71
|
+
* @memberof Endpoint
|
|
72
|
+
*/
|
|
73
|
+
idleTimeout: number;
|
|
74
|
+
/**
|
|
75
|
+
*
|
|
76
|
+
* @type {number}
|
|
77
|
+
* @memberof Endpoint
|
|
78
|
+
*/
|
|
79
|
+
targetConcurrency: number;
|
|
80
|
+
/**
|
|
81
|
+
*
|
|
82
|
+
* @type {number}
|
|
83
|
+
* @memberof Endpoint
|
|
84
|
+
*/
|
|
85
|
+
maxPricePerHour: number | null;
|
|
86
|
+
/**
|
|
87
|
+
*
|
|
88
|
+
* @type {string}
|
|
89
|
+
* @memberof Endpoint
|
|
90
|
+
*/
|
|
91
|
+
hfTokenSecret: string | null;
|
|
92
|
+
/**
|
|
93
|
+
*
|
|
94
|
+
* @type {EndpointReplicaCounts}
|
|
95
|
+
* @memberof Endpoint
|
|
96
|
+
*/
|
|
97
|
+
replicas: EndpointReplicaCounts;
|
|
98
|
+
/**
|
|
99
|
+
*
|
|
100
|
+
* @type {number}
|
|
101
|
+
* @memberof Endpoint
|
|
102
|
+
*/
|
|
103
|
+
requestCount: number;
|
|
104
|
+
/**
|
|
105
|
+
*
|
|
106
|
+
* @type {Date}
|
|
107
|
+
* @memberof Endpoint
|
|
108
|
+
*/
|
|
109
|
+
lastRequestAt: Date | null;
|
|
110
|
+
/**
|
|
111
|
+
* Why the latest machine failed to start, until one becomes ready.
|
|
112
|
+
* @type {string}
|
|
113
|
+
* @memberof Endpoint
|
|
114
|
+
*/
|
|
115
|
+
lastError: string | null;
|
|
116
|
+
/**
|
|
117
|
+
*
|
|
118
|
+
* @type {Date}
|
|
119
|
+
* @memberof Endpoint
|
|
120
|
+
*/
|
|
121
|
+
createdAt: Date;
|
|
122
|
+
/**
|
|
123
|
+
* Recent machines, newest first. Returned by GET /v1/endpoints/{id} only.
|
|
124
|
+
* @type {Array<EndpointMachine>}
|
|
125
|
+
* @memberof Endpoint
|
|
126
|
+
*/
|
|
127
|
+
machines?: Array<EndpointMachine>;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* @export
|
|
131
|
+
*/
|
|
132
|
+
export declare const EndpointStatusEnum: {
|
|
133
|
+
readonly ScaledToZero: "scaled_to_zero";
|
|
134
|
+
readonly Starting: "starting";
|
|
135
|
+
readonly Ready: "ready";
|
|
136
|
+
readonly Failed: "failed";
|
|
137
|
+
readonly Deleting: "deleting";
|
|
138
|
+
};
|
|
139
|
+
export type EndpointStatusEnum = typeof EndpointStatusEnum[keyof typeof EndpointStatusEnum];
|
|
140
|
+
/**
|
|
141
|
+
* Check if a given object implements the Endpoint interface.
|
|
142
|
+
*/
|
|
143
|
+
export declare function instanceOfEndpoint(value: object): value is Endpoint;
|
|
144
|
+
export declare function EndpointFromJSON(json: any): Endpoint;
|
|
145
|
+
export declare function EndpointFromJSONTyped(json: any, ignoreDiscriminator: boolean): Endpoint;
|
|
146
|
+
export declare function EndpointToJSON(json: any): Endpoint;
|
|
147
|
+
export declare function EndpointToJSONTyped(value?: Endpoint | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* GPU.ai Public Developer API
|
|
5
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@gpu.ai
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import { EndpointMachineFromJSON, EndpointMachineToJSON, } from './EndpointMachine';
|
|
15
|
+
import { EndpointReplicaCountsFromJSON, EndpointReplicaCountsToJSON, } from './EndpointReplicaCounts';
|
|
16
|
+
/**
|
|
17
|
+
* @export
|
|
18
|
+
*/
|
|
19
|
+
export const EndpointStatusEnum = {
|
|
20
|
+
ScaledToZero: 'scaled_to_zero',
|
|
21
|
+
Starting: 'starting',
|
|
22
|
+
Ready: 'ready',
|
|
23
|
+
Failed: 'failed',
|
|
24
|
+
Deleting: 'deleting'
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Check if a given object implements the Endpoint interface.
|
|
28
|
+
*/
|
|
29
|
+
export function instanceOfEndpoint(value) {
|
|
30
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
if (!('model' in value) || value['model'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
if ((!('gpuType' in value) && !('gpu_type' in value)) || (value['gpuType'] === undefined && value['gpu_type'] === undefined))
|
|
37
|
+
return false;
|
|
38
|
+
if (!('status' in value) || value['status'] === undefined)
|
|
39
|
+
return false;
|
|
40
|
+
if (!('url' in value) || value['url'] === undefined)
|
|
41
|
+
return false;
|
|
42
|
+
if ((!('minReplicas' in value) && !('min_replicas' in value)) || (value['minReplicas'] === undefined && value['min_replicas'] === undefined))
|
|
43
|
+
return false;
|
|
44
|
+
if ((!('maxReplicas' in value) && !('max_replicas' in value)) || (value['maxReplicas'] === undefined && value['max_replicas'] === undefined))
|
|
45
|
+
return false;
|
|
46
|
+
if ((!('idleTimeout' in value) && !('idle_timeout' in value)) || (value['idleTimeout'] === undefined && value['idle_timeout'] === undefined))
|
|
47
|
+
return false;
|
|
48
|
+
if ((!('targetConcurrency' in value) && !('target_concurrency' in value)) || (value['targetConcurrency'] === undefined && value['target_concurrency'] === undefined))
|
|
49
|
+
return false;
|
|
50
|
+
if ((!('maxPricePerHour' in value) && !('max_price_per_hour' in value)) || (value['maxPricePerHour'] === undefined && value['max_price_per_hour'] === undefined))
|
|
51
|
+
return false;
|
|
52
|
+
if ((!('hfTokenSecret' in value) && !('hf_token_secret' in value)) || (value['hfTokenSecret'] === undefined && value['hf_token_secret'] === undefined))
|
|
53
|
+
return false;
|
|
54
|
+
if (!('replicas' in value) || value['replicas'] === undefined)
|
|
55
|
+
return false;
|
|
56
|
+
if ((!('requestCount' in value) && !('request_count' in value)) || (value['requestCount'] === undefined && value['request_count'] === undefined))
|
|
57
|
+
return false;
|
|
58
|
+
if ((!('lastRequestAt' in value) && !('last_request_at' in value)) || (value['lastRequestAt'] === undefined && value['last_request_at'] === undefined))
|
|
59
|
+
return false;
|
|
60
|
+
if ((!('lastError' in value) && !('last_error' in value)) || (value['lastError'] === undefined && value['last_error'] === undefined))
|
|
61
|
+
return false;
|
|
62
|
+
if ((!('createdAt' in value) && !('created_at' in value)) || (value['createdAt'] === undefined && value['created_at'] === undefined))
|
|
63
|
+
return false;
|
|
64
|
+
return true;
|
|
65
|
+
}
|
|
66
|
+
export function EndpointFromJSON(json) {
|
|
67
|
+
return EndpointFromJSONTyped(json, false);
|
|
68
|
+
}
|
|
69
|
+
export function EndpointFromJSONTyped(json, ignoreDiscriminator) {
|
|
70
|
+
if (json == null) {
|
|
71
|
+
return json;
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
'id': json['id'],
|
|
75
|
+
'name': json['name'],
|
|
76
|
+
'model': json['model'],
|
|
77
|
+
'gpuType': json['gpu_type'],
|
|
78
|
+
'status': json['status'],
|
|
79
|
+
'url': json['url'],
|
|
80
|
+
'minReplicas': json['min_replicas'],
|
|
81
|
+
'maxReplicas': json['max_replicas'],
|
|
82
|
+
'idleTimeout': json['idle_timeout'],
|
|
83
|
+
'targetConcurrency': json['target_concurrency'],
|
|
84
|
+
'maxPricePerHour': json['max_price_per_hour'],
|
|
85
|
+
'hfTokenSecret': json['hf_token_secret'],
|
|
86
|
+
'replicas': EndpointReplicaCountsFromJSON(json['replicas']),
|
|
87
|
+
'requestCount': json['request_count'],
|
|
88
|
+
'lastRequestAt': (json['last_request_at'] == null ? null : new Date(json['last_request_at'])),
|
|
89
|
+
'lastError': json['last_error'],
|
|
90
|
+
'createdAt': (new Date(json['created_at'])),
|
|
91
|
+
'machines': json['machines'] == null ? undefined : (json['machines'].map(EndpointMachineFromJSON)),
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
export function EndpointToJSON(json) {
|
|
95
|
+
return EndpointToJSONTyped(json, false);
|
|
96
|
+
}
|
|
97
|
+
export function EndpointToJSONTyped(value, ignoreDiscriminator = false) {
|
|
98
|
+
if (value == null) {
|
|
99
|
+
return value;
|
|
100
|
+
}
|
|
101
|
+
return {
|
|
102
|
+
'id': value['id'],
|
|
103
|
+
'name': value['name'],
|
|
104
|
+
'model': value['model'],
|
|
105
|
+
'gpu_type': value['gpuType'],
|
|
106
|
+
'status': value['status'],
|
|
107
|
+
'url': value['url'],
|
|
108
|
+
'min_replicas': value['minReplicas'],
|
|
109
|
+
'max_replicas': value['maxReplicas'],
|
|
110
|
+
'idle_timeout': value['idleTimeout'],
|
|
111
|
+
'target_concurrency': value['targetConcurrency'],
|
|
112
|
+
'max_price_per_hour': value['maxPricePerHour'],
|
|
113
|
+
'hf_token_secret': value['hfTokenSecret'],
|
|
114
|
+
'replicas': EndpointReplicaCountsToJSON(value['replicas']),
|
|
115
|
+
'request_count': value['requestCount'],
|
|
116
|
+
'last_request_at': value['lastRequestAt'] == null ? value['lastRequestAt'] : value['lastRequestAt'].toISOString(),
|
|
117
|
+
'last_error': value['lastError'],
|
|
118
|
+
'created_at': value['createdAt'].toISOString(),
|
|
119
|
+
'machines': value['machines'] == null ? undefined : (value['machines'].map(EndpointMachineToJSON)),
|
|
120
|
+
};
|
|
121
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GPU.ai Public Developer API
|
|
3
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: support@gpu.ai
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface EndpointCreate
|
|
16
|
+
*/
|
|
17
|
+
export interface EndpointCreate {
|
|
18
|
+
/**
|
|
19
|
+
* Lowercase letters, digits and hyphens, starting with a letter; 48 characters at most. Unique among the organization's endpoints.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof EndpointCreate
|
|
22
|
+
*/
|
|
23
|
+
name: string;
|
|
24
|
+
/**
|
|
25
|
+
* A Hugging Face model id.
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof EndpointCreate
|
|
28
|
+
*/
|
|
29
|
+
model: string;
|
|
30
|
+
/**
|
|
31
|
+
* The GPU each machine runs on (see GET /v1/gpu-types). At least 24 GB of memory.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof EndpointCreate
|
|
34
|
+
*/
|
|
35
|
+
gpuType: string;
|
|
36
|
+
/**
|
|
37
|
+
* Machines kept running even with no requests. Default 0 (scale to zero).
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof EndpointCreate
|
|
40
|
+
*/
|
|
41
|
+
minReplicas?: number;
|
|
42
|
+
/**
|
|
43
|
+
* Most machines the endpoint scales out to. Default 1.
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof EndpointCreate
|
|
46
|
+
*/
|
|
47
|
+
maxReplicas?: number;
|
|
48
|
+
/**
|
|
49
|
+
* Seconds without a request before a machine is released. Default 300.
|
|
50
|
+
* @type {number}
|
|
51
|
+
* @memberof EndpointCreate
|
|
52
|
+
*/
|
|
53
|
+
idleTimeout?: number;
|
|
54
|
+
/**
|
|
55
|
+
* In-flight requests per machine before another starts. Default 16.
|
|
56
|
+
* @type {number}
|
|
57
|
+
* @memberof EndpointCreate
|
|
58
|
+
*/
|
|
59
|
+
targetConcurrency?: number;
|
|
60
|
+
/**
|
|
61
|
+
* Highest hourly price for a machine.
|
|
62
|
+
* @type {number}
|
|
63
|
+
* @memberof EndpointCreate
|
|
64
|
+
*/
|
|
65
|
+
maxPricePerHour?: number;
|
|
66
|
+
/**
|
|
67
|
+
* Name of an organization secret holding a Hugging Face token, delivered as HF_TOKEN (for gated models).
|
|
68
|
+
* @type {string}
|
|
69
|
+
* @memberof EndpointCreate
|
|
70
|
+
*/
|
|
71
|
+
hfTokenSecret?: string;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Check if a given object implements the EndpointCreate interface.
|
|
75
|
+
*/
|
|
76
|
+
export declare function instanceOfEndpointCreate(value: object): value is EndpointCreate;
|
|
77
|
+
export declare function EndpointCreateFromJSON(json: any): EndpointCreate;
|
|
78
|
+
export declare function EndpointCreateFromJSONTyped(json: any, ignoreDiscriminator: boolean): EndpointCreate;
|
|
79
|
+
export declare function EndpointCreateToJSON(json: any): EndpointCreate;
|
|
80
|
+
export declare function EndpointCreateToJSONTyped(value?: EndpointCreate | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* GPU.ai Public Developer API
|
|
5
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@gpu.ai
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Check if a given object implements the EndpointCreate interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfEndpointCreate(value) {
|
|
18
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
if (!('model' in value) || value['model'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
if ((!('gpuType' in value) && !('gpu_type' in value)) || (value['gpuType'] === undefined && value['gpu_type'] === undefined))
|
|
23
|
+
return false;
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
export function EndpointCreateFromJSON(json) {
|
|
27
|
+
return EndpointCreateFromJSONTyped(json, false);
|
|
28
|
+
}
|
|
29
|
+
export function EndpointCreateFromJSONTyped(json, ignoreDiscriminator) {
|
|
30
|
+
if (json == null) {
|
|
31
|
+
return json;
|
|
32
|
+
}
|
|
33
|
+
return {
|
|
34
|
+
'name': json['name'],
|
|
35
|
+
'model': json['model'],
|
|
36
|
+
'gpuType': json['gpu_type'],
|
|
37
|
+
'minReplicas': json['min_replicas'] == null ? undefined : json['min_replicas'],
|
|
38
|
+
'maxReplicas': json['max_replicas'] == null ? undefined : json['max_replicas'],
|
|
39
|
+
'idleTimeout': json['idle_timeout'] == null ? undefined : json['idle_timeout'],
|
|
40
|
+
'targetConcurrency': json['target_concurrency'] == null ? undefined : json['target_concurrency'],
|
|
41
|
+
'maxPricePerHour': json['max_price_per_hour'] == null ? undefined : json['max_price_per_hour'],
|
|
42
|
+
'hfTokenSecret': json['hf_token_secret'] == null ? undefined : json['hf_token_secret'],
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export function EndpointCreateToJSON(json) {
|
|
46
|
+
return EndpointCreateToJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
export function EndpointCreateToJSONTyped(value, ignoreDiscriminator = false) {
|
|
49
|
+
if (value == null) {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
'name': value['name'],
|
|
54
|
+
'model': value['model'],
|
|
55
|
+
'gpu_type': value['gpuType'],
|
|
56
|
+
'min_replicas': value['minReplicas'],
|
|
57
|
+
'max_replicas': value['maxReplicas'],
|
|
58
|
+
'idle_timeout': value['idleTimeout'],
|
|
59
|
+
'target_concurrency': value['targetConcurrency'],
|
|
60
|
+
'max_price_per_hour': value['maxPricePerHour'],
|
|
61
|
+
'hf_token_secret': value['hfTokenSecret'],
|
|
62
|
+
};
|
|
63
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GPU.ai Public Developer API
|
|
3
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: support@gpu.ai
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { Endpoint } from './Endpoint';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface EndpointList
|
|
17
|
+
*/
|
|
18
|
+
export interface EndpointList {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {Array<Endpoint>}
|
|
22
|
+
* @memberof EndpointList
|
|
23
|
+
*/
|
|
24
|
+
data: Array<Endpoint>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Check if a given object implements the EndpointList interface.
|
|
28
|
+
*/
|
|
29
|
+
export declare function instanceOfEndpointList(value: object): value is EndpointList;
|
|
30
|
+
export declare function EndpointListFromJSON(json: any): EndpointList;
|
|
31
|
+
export declare function EndpointListFromJSONTyped(json: any, ignoreDiscriminator: boolean): EndpointList;
|
|
32
|
+
export declare function EndpointListToJSON(json: any): EndpointList;
|
|
33
|
+
export declare function EndpointListToJSONTyped(value?: EndpointList | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* GPU.ai Public Developer API
|
|
5
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@gpu.ai
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import { EndpointFromJSON, EndpointToJSON, } from './Endpoint';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the EndpointList interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfEndpointList(value) {
|
|
19
|
+
if (!('data' in value) || value['data'] === undefined)
|
|
20
|
+
return false;
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
export function EndpointListFromJSON(json) {
|
|
24
|
+
return EndpointListFromJSONTyped(json, false);
|
|
25
|
+
}
|
|
26
|
+
export function EndpointListFromJSONTyped(json, ignoreDiscriminator) {
|
|
27
|
+
if (json == null) {
|
|
28
|
+
return json;
|
|
29
|
+
}
|
|
30
|
+
return {
|
|
31
|
+
'data': (json['data'].map(EndpointFromJSON)),
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export function EndpointListToJSON(json) {
|
|
35
|
+
return EndpointListToJSONTyped(json, false);
|
|
36
|
+
}
|
|
37
|
+
export function EndpointListToJSONTyped(value, ignoreDiscriminator = false) {
|
|
38
|
+
if (value == null) {
|
|
39
|
+
return value;
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
'data': (value['data'].map(EndpointToJSON)),
|
|
43
|
+
};
|
|
44
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GPU.ai Public Developer API
|
|
3
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: support@gpu.ai
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface EndpointMachine
|
|
16
|
+
*/
|
|
17
|
+
export interface EndpointMachine {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof EndpointMachine
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {EndpointMachineStatusEnum}
|
|
27
|
+
* @memberof EndpointMachine
|
|
28
|
+
*/
|
|
29
|
+
status: EndpointMachineStatusEnum;
|
|
30
|
+
/**
|
|
31
|
+
* The instance the machine runs as (it appears in the instance list as ep-<name>-<id>).
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof EndpointMachine
|
|
34
|
+
*/
|
|
35
|
+
instanceId: string | null;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof EndpointMachine
|
|
40
|
+
*/
|
|
41
|
+
gpuType: string | null;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof EndpointMachine
|
|
46
|
+
*/
|
|
47
|
+
pricePerHour: number | null;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {Date}
|
|
51
|
+
* @memberof EndpointMachine
|
|
52
|
+
*/
|
|
53
|
+
readyAt: Date | null;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {Date}
|
|
57
|
+
* @memberof EndpointMachine
|
|
58
|
+
*/
|
|
59
|
+
terminatedAt: Date | null;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {string}
|
|
63
|
+
* @memberof EndpointMachine
|
|
64
|
+
*/
|
|
65
|
+
terminateReason: string | null;
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* @type {Date}
|
|
69
|
+
* @memberof EndpointMachine
|
|
70
|
+
*/
|
|
71
|
+
createdAt: Date;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* @export
|
|
75
|
+
*/
|
|
76
|
+
export declare const EndpointMachineStatusEnum: {
|
|
77
|
+
readonly Launching: "launching";
|
|
78
|
+
readonly Ready: "ready";
|
|
79
|
+
readonly Terminating: "terminating";
|
|
80
|
+
readonly Terminated: "terminated";
|
|
81
|
+
};
|
|
82
|
+
export type EndpointMachineStatusEnum = typeof EndpointMachineStatusEnum[keyof typeof EndpointMachineStatusEnum];
|
|
83
|
+
/**
|
|
84
|
+
* Check if a given object implements the EndpointMachine interface.
|
|
85
|
+
*/
|
|
86
|
+
export declare function instanceOfEndpointMachine(value: object): value is EndpointMachine;
|
|
87
|
+
export declare function EndpointMachineFromJSON(json: any): EndpointMachine;
|
|
88
|
+
export declare function EndpointMachineFromJSONTyped(json: any, ignoreDiscriminator: boolean): EndpointMachine;
|
|
89
|
+
export declare function EndpointMachineToJSON(json: any): EndpointMachine;
|
|
90
|
+
export declare function EndpointMachineToJSONTyped(value?: EndpointMachine | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* GPU.ai Public Developer API
|
|
5
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@gpu.ai
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* @export
|
|
16
|
+
*/
|
|
17
|
+
export const EndpointMachineStatusEnum = {
|
|
18
|
+
Launching: 'launching',
|
|
19
|
+
Ready: 'ready',
|
|
20
|
+
Terminating: 'terminating',
|
|
21
|
+
Terminated: 'terminated'
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the EndpointMachine interface.
|
|
25
|
+
*/
|
|
26
|
+
export function instanceOfEndpointMachine(value) {
|
|
27
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('status' in value) || value['status'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if ((!('instanceId' in value) && !('instance_id' in value)) || (value['instanceId'] === undefined && value['instance_id'] === undefined))
|
|
32
|
+
return false;
|
|
33
|
+
if ((!('gpuType' in value) && !('gpu_type' in value)) || (value['gpuType'] === undefined && value['gpu_type'] === undefined))
|
|
34
|
+
return false;
|
|
35
|
+
if ((!('pricePerHour' in value) && !('price_per_hour' in value)) || (value['pricePerHour'] === undefined && value['price_per_hour'] === undefined))
|
|
36
|
+
return false;
|
|
37
|
+
if ((!('readyAt' in value) && !('ready_at' in value)) || (value['readyAt'] === undefined && value['ready_at'] === undefined))
|
|
38
|
+
return false;
|
|
39
|
+
if ((!('terminatedAt' in value) && !('terminated_at' in value)) || (value['terminatedAt'] === undefined && value['terminated_at'] === undefined))
|
|
40
|
+
return false;
|
|
41
|
+
if ((!('terminateReason' in value) && !('terminate_reason' in value)) || (value['terminateReason'] === undefined && value['terminate_reason'] === undefined))
|
|
42
|
+
return false;
|
|
43
|
+
if ((!('createdAt' in value) && !('created_at' in value)) || (value['createdAt'] === undefined && value['created_at'] === undefined))
|
|
44
|
+
return false;
|
|
45
|
+
return true;
|
|
46
|
+
}
|
|
47
|
+
export function EndpointMachineFromJSON(json) {
|
|
48
|
+
return EndpointMachineFromJSONTyped(json, false);
|
|
49
|
+
}
|
|
50
|
+
export function EndpointMachineFromJSONTyped(json, ignoreDiscriminator) {
|
|
51
|
+
if (json == null) {
|
|
52
|
+
return json;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
'id': json['id'],
|
|
56
|
+
'status': json['status'],
|
|
57
|
+
'instanceId': json['instance_id'],
|
|
58
|
+
'gpuType': json['gpu_type'],
|
|
59
|
+
'pricePerHour': json['price_per_hour'],
|
|
60
|
+
'readyAt': (json['ready_at'] == null ? null : new Date(json['ready_at'])),
|
|
61
|
+
'terminatedAt': (json['terminated_at'] == null ? null : new Date(json['terminated_at'])),
|
|
62
|
+
'terminateReason': json['terminate_reason'],
|
|
63
|
+
'createdAt': (new Date(json['created_at'])),
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
export function EndpointMachineToJSON(json) {
|
|
67
|
+
return EndpointMachineToJSONTyped(json, false);
|
|
68
|
+
}
|
|
69
|
+
export function EndpointMachineToJSONTyped(value, ignoreDiscriminator = false) {
|
|
70
|
+
if (value == null) {
|
|
71
|
+
return value;
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
'id': value['id'],
|
|
75
|
+
'status': value['status'],
|
|
76
|
+
'instance_id': value['instanceId'],
|
|
77
|
+
'gpu_type': value['gpuType'],
|
|
78
|
+
'price_per_hour': value['pricePerHour'],
|
|
79
|
+
'ready_at': value['readyAt'] == null ? value['readyAt'] : value['readyAt'].toISOString(),
|
|
80
|
+
'terminated_at': value['terminatedAt'] == null ? value['terminatedAt'] : value['terminatedAt'].toISOString(),
|
|
81
|
+
'terminate_reason': value['terminateReason'],
|
|
82
|
+
'created_at': value['createdAt'].toISOString(),
|
|
83
|
+
};
|
|
84
|
+
}
|