@gpuai/sdk 0.3.18 → 0.4.1
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 +48 -0
- package/README.md +41 -2
- package/dist/apis/BillingApi.d.ts +70 -0
- package/dist/apis/BillingApi.js +197 -0
- package/dist/apis/FunctionsApi.d.ts +228 -0
- package/dist/apis/FunctionsApi.js +627 -0
- package/dist/apis/InstancesApi.d.ts +18 -0
- package/dist/apis/InstancesApi.js +49 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/BillingApi.d.ts +70 -0
- package/dist/esm/apis/BillingApi.js +197 -0
- package/dist/esm/apis/FunctionsApi.d.ts +228 -0
- package/dist/esm/apis/FunctionsApi.js +623 -0
- package/dist/esm/apis/InstancesApi.d.ts +18 -0
- package/dist/esm/apis/InstancesApi.js +49 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/AutolaunchRule.d.ts +2 -1
- package/dist/esm/models/BillingDetails.d.ts +98 -0
- package/dist/esm/models/BillingDetails.js +85 -0
- package/dist/esm/models/CreateFunctionRequest.d.ts +32 -0
- package/dist/esm/models/CreateFunctionRequest.js +43 -0
- package/dist/esm/models/CreateFunctionRunRequest.d.ts +38 -0
- package/dist/esm/models/CreateFunctionRunRequest.js +45 -0
- package/dist/esm/models/CreateFunctionVersionRequest.d.ts +110 -0
- package/dist/esm/models/CreateFunctionVersionRequest.js +79 -0
- package/dist/esm/models/Function.d.ts +163 -0
- package/dist/esm/models/Function.js +109 -0
- package/dist/esm/models/FunctionList.d.ts +33 -0
- package/dist/esm/models/FunctionList.js +44 -0
- package/dist/esm/models/FunctionReplicaCounts.d.ts +44 -0
- package/dist/esm/models/FunctionReplicaCounts.js +51 -0
- package/dist/esm/models/FunctionRun.d.ts +130 -0
- package/dist/esm/models/FunctionRun.js +94 -0
- package/dist/esm/models/FunctionRunError.d.ts +44 -0
- package/dist/esm/models/FunctionRunError.js +49 -0
- package/dist/esm/models/FunctionRunList.d.ts +39 -0
- package/dist/esm/models/FunctionRunList.js +48 -0
- package/dist/esm/models/FunctionRunLogChunk.d.ts +59 -0
- package/dist/esm/models/FunctionRunLogChunk.js +63 -0
- package/dist/esm/models/FunctionRunLogs.d.ts +45 -0
- package/dist/esm/models/FunctionRunLogs.js +52 -0
- package/dist/esm/models/FunctionUpload.d.ts +51 -0
- package/dist/esm/models/FunctionUpload.js +59 -0
- package/dist/esm/models/FunctionVersion.d.ts +137 -0
- package/dist/esm/models/FunctionVersion.js +109 -0
- package/dist/esm/models/GpuSuggestion.d.ts +82 -0
- package/dist/esm/models/GpuSuggestion.js +77 -0
- package/dist/esm/models/GpuSuggestionCheaper.d.ts +62 -0
- package/dist/esm/models/GpuSuggestionCheaper.js +63 -0
- package/dist/esm/models/GpuSuggestionGpu.d.ts +50 -0
- package/dist/esm/models/GpuSuggestionGpu.js +55 -0
- package/dist/esm/models/Instance.d.ts +7 -0
- package/dist/esm/models/Instance.js +3 -0
- package/dist/esm/models/InstanceGpuMemory.d.ts +51 -0
- package/dist/esm/models/InstanceGpuMemory.js +55 -0
- package/dist/esm/models/Invoice.d.ts +68 -0
- package/dist/esm/models/Invoice.js +67 -0
- package/dist/esm/models/InvoiceList.d.ts +45 -0
- package/dist/esm/models/InvoiceList.js +50 -0
- package/dist/esm/models/ModelPricing.d.ts +46 -0
- package/dist/esm/models/ModelPricing.js +21 -0
- package/dist/esm/models/ModelRate.d.ts +62 -0
- package/dist/esm/models/ModelRate.js +51 -0
- package/dist/esm/models/PeakWindow.d.ts +38 -0
- package/dist/esm/models/PeakWindow.js +47 -0
- package/dist/esm/models/UpdateBillingDetailsRequest.d.ts +80 -0
- package/dist/esm/models/UpdateBillingDetailsRequest.js +57 -0
- package/dist/esm/models/index.d.ts +23 -0
- package/dist/esm/models/index.js +23 -0
- package/dist/esm/runtime.js +1 -1
- package/dist/models/AutolaunchRule.d.ts +2 -1
- package/dist/models/BillingDetails.d.ts +98 -0
- package/dist/models/BillingDetails.js +92 -0
- package/dist/models/CreateFunctionRequest.d.ts +32 -0
- package/dist/models/CreateFunctionRequest.js +50 -0
- package/dist/models/CreateFunctionRunRequest.d.ts +38 -0
- package/dist/models/CreateFunctionRunRequest.js +52 -0
- package/dist/models/CreateFunctionVersionRequest.d.ts +110 -0
- package/dist/models/CreateFunctionVersionRequest.js +86 -0
- package/dist/models/Function.d.ts +163 -0
- package/dist/models/Function.js +117 -0
- package/dist/models/FunctionList.d.ts +33 -0
- package/dist/models/FunctionList.js +51 -0
- package/dist/models/FunctionReplicaCounts.d.ts +44 -0
- package/dist/models/FunctionReplicaCounts.js +58 -0
- package/dist/models/FunctionRun.d.ts +130 -0
- package/dist/models/FunctionRun.js +102 -0
- package/dist/models/FunctionRunError.d.ts +44 -0
- package/dist/models/FunctionRunError.js +56 -0
- package/dist/models/FunctionRunList.d.ts +39 -0
- package/dist/models/FunctionRunList.js +55 -0
- package/dist/models/FunctionRunLogChunk.d.ts +59 -0
- package/dist/models/FunctionRunLogChunk.js +71 -0
- package/dist/models/FunctionRunLogs.d.ts +45 -0
- package/dist/models/FunctionRunLogs.js +59 -0
- package/dist/models/FunctionUpload.d.ts +51 -0
- package/dist/models/FunctionUpload.js +67 -0
- package/dist/models/FunctionVersion.d.ts +137 -0
- package/dist/models/FunctionVersion.js +117 -0
- package/dist/models/GpuSuggestion.d.ts +82 -0
- package/dist/models/GpuSuggestion.js +85 -0
- package/dist/models/GpuSuggestionCheaper.d.ts +62 -0
- package/dist/models/GpuSuggestionCheaper.js +70 -0
- package/dist/models/GpuSuggestionGpu.d.ts +50 -0
- package/dist/models/GpuSuggestionGpu.js +62 -0
- package/dist/models/Instance.d.ts +7 -0
- package/dist/models/Instance.js +3 -0
- package/dist/models/InstanceGpuMemory.d.ts +51 -0
- package/dist/models/InstanceGpuMemory.js +62 -0
- package/dist/models/Invoice.d.ts +68 -0
- package/dist/models/Invoice.js +74 -0
- package/dist/models/InvoiceList.d.ts +45 -0
- package/dist/models/InvoiceList.js +57 -0
- package/dist/models/ModelPricing.d.ts +46 -0
- package/dist/models/ModelPricing.js +22 -0
- package/dist/models/ModelRate.d.ts +62 -0
- package/dist/models/ModelRate.js +58 -0
- package/dist/models/PeakWindow.d.ts +38 -0
- package/dist/models/PeakWindow.js +54 -0
- package/dist/models/UpdateBillingDetailsRequest.d.ts +80 -0
- package/dist/models/UpdateBillingDetailsRequest.js +64 -0
- package/dist/models/index.d.ts +23 -0
- package/dist/models/index.js +23 -0
- package/dist/runtime.js +1 -1
- package/docs/BillingApi.md +299 -0
- package/docs/BillingDetails.md +56 -0
- package/docs/CreateFunctionRequest.md +34 -0
- package/docs/CreateFunctionRunRequest.md +36 -0
- package/docs/CreateFunctionVersionRequest.md +60 -0
- package/docs/Function.md +75 -0
- package/docs/FunctionList.md +34 -0
- package/docs/FunctionReplicaCounts.md +39 -0
- package/docs/FunctionRun.md +63 -0
- package/docs/FunctionRunError.md +38 -0
- package/docs/FunctionRunList.md +36 -0
- package/docs/FunctionRunLogChunk.md +40 -0
- package/docs/FunctionRunLogs.md +38 -0
- package/docs/FunctionUpload.md +38 -0
- package/docs/FunctionVersion.md +66 -0
- package/docs/FunctionsApi.md +880 -0
- package/docs/GpuSuggestion.md +47 -0
- package/docs/GpuSuggestionCheaper.md +45 -0
- package/docs/GpuSuggestionGpu.md +41 -0
- package/docs/Instance.md +2 -0
- package/docs/InstanceGpuMemory.md +41 -0
- package/docs/InstancesApi.md +75 -0
- package/docs/Invoice.md +46 -0
- package/docs/InvoiceList.md +38 -0
- package/docs/ModelPricing.md +12 -0
- package/docs/ModelRate.md +45 -0
- package/docs/PeakWindow.md +37 -0
- package/docs/UpdateBillingDetailsRequest.md +50 -0
- package/package.json +1 -1
- package/src/apis/BillingApi.ts +247 -0
- package/src/apis/FunctionsApi.ts +828 -0
- package/src/apis/InstancesApi.ts +64 -0
- package/src/apis/index.ts +1 -0
- package/src/models/AutolaunchRule.ts +2 -1
- package/src/models/BillingDetails.ts +164 -0
- package/src/models/CreateFunctionRequest.ts +66 -0
- package/src/models/CreateFunctionRunRequest.ts +74 -0
- package/src/models/CreateFunctionVersionRequest.ts +175 -0
- package/src/models/Function.ts +255 -0
- package/src/models/FunctionList.ts +74 -0
- package/src/models/FunctionReplicaCounts.ts +84 -0
- package/src/models/FunctionRun.ts +207 -0
- package/src/models/FunctionRunError.ts +83 -0
- package/src/models/FunctionRunList.ts +83 -0
- package/src/models/FunctionRunLogChunk.ts +105 -0
- package/src/models/FunctionRunLogs.ts +92 -0
- package/src/models/FunctionUpload.ts +96 -0
- package/src/models/FunctionVersion.ts +226 -0
- package/src/models/GpuSuggestion.ts +150 -0
- package/src/models/GpuSuggestionCheaper.ts +111 -0
- package/src/models/GpuSuggestionGpu.ts +93 -0
- package/src/models/Instance.ts +15 -0
- package/src/models/InstanceGpuMemory.ts +94 -0
- package/src/models/Invoice.ts +120 -0
- package/src/models/InvoiceList.ts +91 -0
- package/src/models/ModelPricing.ts +74 -0
- package/src/models/ModelRate.ts +105 -0
- package/src/models/PeakWindow.ts +75 -0
- package/src/models/UpdateBillingDetailsRequest.ts +129 -0
- package/src/models/index.ts +23 -0
- package/src/runtime.ts +1 -1
|
@@ -0,0 +1,51 @@
|
|
|
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 FunctionUpload
|
|
16
|
+
*/
|
|
17
|
+
export interface FunctionUpload {
|
|
18
|
+
/**
|
|
19
|
+
* Where to send the pickled function.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof FunctionUpload
|
|
22
|
+
*/
|
|
23
|
+
url: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {FunctionUploadMethodEnum}
|
|
27
|
+
* @memberof FunctionUpload
|
|
28
|
+
*/
|
|
29
|
+
method: FunctionUploadMethodEnum;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {Date}
|
|
33
|
+
* @memberof FunctionUpload
|
|
34
|
+
*/
|
|
35
|
+
expiresAt: Date;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* @export
|
|
39
|
+
*/
|
|
40
|
+
export declare const FunctionUploadMethodEnum: {
|
|
41
|
+
readonly Put: "PUT";
|
|
42
|
+
};
|
|
43
|
+
export type FunctionUploadMethodEnum = typeof FunctionUploadMethodEnum[keyof typeof FunctionUploadMethodEnum];
|
|
44
|
+
/**
|
|
45
|
+
* Check if a given object implements the FunctionUpload interface.
|
|
46
|
+
*/
|
|
47
|
+
export declare function instanceOfFunctionUpload(value: object): value is FunctionUpload;
|
|
48
|
+
export declare function FunctionUploadFromJSON(json: any): FunctionUpload;
|
|
49
|
+
export declare function FunctionUploadFromJSONTyped(json: any, ignoreDiscriminator: boolean): FunctionUpload;
|
|
50
|
+
export declare function FunctionUploadToJSON(json: any): FunctionUpload;
|
|
51
|
+
export declare function FunctionUploadToJSONTyped(value?: FunctionUpload | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* GPU.ai Public Developer API
|
|
6
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: support@gpu.ai
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.FunctionUploadMethodEnum = void 0;
|
|
17
|
+
exports.instanceOfFunctionUpload = instanceOfFunctionUpload;
|
|
18
|
+
exports.FunctionUploadFromJSON = FunctionUploadFromJSON;
|
|
19
|
+
exports.FunctionUploadFromJSONTyped = FunctionUploadFromJSONTyped;
|
|
20
|
+
exports.FunctionUploadToJSON = FunctionUploadToJSON;
|
|
21
|
+
exports.FunctionUploadToJSONTyped = FunctionUploadToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
exports.FunctionUploadMethodEnum = {
|
|
26
|
+
Put: 'PUT'
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Check if a given object implements the FunctionUpload interface.
|
|
30
|
+
*/
|
|
31
|
+
function instanceOfFunctionUpload(value) {
|
|
32
|
+
if (!('url' in value) || value['url'] === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
if (!('method' in value) || value['method'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
if (value['method'] !== 'PUT')
|
|
37
|
+
return false;
|
|
38
|
+
if ((!('expiresAt' in value) && !('expires_at' in value)) || (value['expiresAt'] === undefined && value['expires_at'] === undefined))
|
|
39
|
+
return false;
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
function FunctionUploadFromJSON(json) {
|
|
43
|
+
return FunctionUploadFromJSONTyped(json, false);
|
|
44
|
+
}
|
|
45
|
+
function FunctionUploadFromJSONTyped(json, ignoreDiscriminator) {
|
|
46
|
+
if (json == null) {
|
|
47
|
+
return json;
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
'url': json['url'],
|
|
51
|
+
'method': json['method'],
|
|
52
|
+
'expiresAt': (new Date(json['expires_at'])),
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function FunctionUploadToJSON(json) {
|
|
56
|
+
return FunctionUploadToJSONTyped(json, false);
|
|
57
|
+
}
|
|
58
|
+
function FunctionUploadToJSONTyped(value, ignoreDiscriminator = false) {
|
|
59
|
+
if (value == null) {
|
|
60
|
+
return value;
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
'url': value['url'],
|
|
64
|
+
'method': value['method'],
|
|
65
|
+
'expires_at': value['expiresAt'].toISOString(),
|
|
66
|
+
};
|
|
67
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
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 { FunctionUpload } from './FunctionUpload';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface FunctionVersion
|
|
17
|
+
*/
|
|
18
|
+
export interface FunctionVersion {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof FunctionVersion
|
|
23
|
+
*/
|
|
24
|
+
id: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof FunctionVersion
|
|
29
|
+
*/
|
|
30
|
+
functionId: string;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {FunctionVersionStatusEnum}
|
|
34
|
+
* @memberof FunctionVersion
|
|
35
|
+
*/
|
|
36
|
+
status: FunctionVersionStatusEnum;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof FunctionVersion
|
|
41
|
+
*/
|
|
42
|
+
contentHash: string;
|
|
43
|
+
/**
|
|
44
|
+
* Present while the bundle still has to be uploaded.
|
|
45
|
+
* @type {FunctionUpload}
|
|
46
|
+
* @memberof FunctionVersion
|
|
47
|
+
*/
|
|
48
|
+
upload?: FunctionUpload | null;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof FunctionVersion
|
|
53
|
+
*/
|
|
54
|
+
pythonVersion: string;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {string}
|
|
58
|
+
* @memberof FunctionVersion
|
|
59
|
+
*/
|
|
60
|
+
cloudpickleVersion: string;
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @type {Array<string>}
|
|
64
|
+
* @memberof FunctionVersion
|
|
65
|
+
*/
|
|
66
|
+
pip: Array<string>;
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* @type {string}
|
|
70
|
+
* @memberof FunctionVersion
|
|
71
|
+
*/
|
|
72
|
+
gpu?: string | null;
|
|
73
|
+
/**
|
|
74
|
+
*
|
|
75
|
+
* @type {number}
|
|
76
|
+
* @memberof FunctionVersion
|
|
77
|
+
*/
|
|
78
|
+
gpuCount: number;
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* @type {number}
|
|
82
|
+
* @memberof FunctionVersion
|
|
83
|
+
*/
|
|
84
|
+
minVramGb: number;
|
|
85
|
+
/**
|
|
86
|
+
*
|
|
87
|
+
* @type {Array<string>}
|
|
88
|
+
* @memberof FunctionVersion
|
|
89
|
+
*/
|
|
90
|
+
regions: Array<string>;
|
|
91
|
+
/**
|
|
92
|
+
*
|
|
93
|
+
* @type {number}
|
|
94
|
+
* @memberof FunctionVersion
|
|
95
|
+
*/
|
|
96
|
+
maxPricePerHour?: number | null;
|
|
97
|
+
/**
|
|
98
|
+
*
|
|
99
|
+
* @type {number}
|
|
100
|
+
* @memberof FunctionVersion
|
|
101
|
+
*/
|
|
102
|
+
timeout: number;
|
|
103
|
+
/**
|
|
104
|
+
*
|
|
105
|
+
* @type {number}
|
|
106
|
+
* @memberof FunctionVersion
|
|
107
|
+
*/
|
|
108
|
+
idleTimeout: number;
|
|
109
|
+
/**
|
|
110
|
+
*
|
|
111
|
+
* @type {number}
|
|
112
|
+
* @memberof FunctionVersion
|
|
113
|
+
*/
|
|
114
|
+
maxConcurrency: number;
|
|
115
|
+
/**
|
|
116
|
+
*
|
|
117
|
+
* @type {Date}
|
|
118
|
+
* @memberof FunctionVersion
|
|
119
|
+
*/
|
|
120
|
+
createdAt: Date;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* @export
|
|
124
|
+
*/
|
|
125
|
+
export declare const FunctionVersionStatusEnum: {
|
|
126
|
+
readonly PendingUpload: "pending_upload";
|
|
127
|
+
readonly Ready: "ready";
|
|
128
|
+
};
|
|
129
|
+
export type FunctionVersionStatusEnum = typeof FunctionVersionStatusEnum[keyof typeof FunctionVersionStatusEnum];
|
|
130
|
+
/**
|
|
131
|
+
* Check if a given object implements the FunctionVersion interface.
|
|
132
|
+
*/
|
|
133
|
+
export declare function instanceOfFunctionVersion(value: object): value is FunctionVersion;
|
|
134
|
+
export declare function FunctionVersionFromJSON(json: any): FunctionVersion;
|
|
135
|
+
export declare function FunctionVersionFromJSONTyped(json: any, ignoreDiscriminator: boolean): FunctionVersion;
|
|
136
|
+
export declare function FunctionVersionToJSON(json: any): FunctionVersion;
|
|
137
|
+
export declare function FunctionVersionToJSONTyped(value?: FunctionVersion | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* GPU.ai Public Developer API
|
|
6
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: support@gpu.ai
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.FunctionVersionStatusEnum = void 0;
|
|
17
|
+
exports.instanceOfFunctionVersion = instanceOfFunctionVersion;
|
|
18
|
+
exports.FunctionVersionFromJSON = FunctionVersionFromJSON;
|
|
19
|
+
exports.FunctionVersionFromJSONTyped = FunctionVersionFromJSONTyped;
|
|
20
|
+
exports.FunctionVersionToJSON = FunctionVersionToJSON;
|
|
21
|
+
exports.FunctionVersionToJSONTyped = FunctionVersionToJSONTyped;
|
|
22
|
+
const FunctionUpload_1 = require("./FunctionUpload");
|
|
23
|
+
/**
|
|
24
|
+
* @export
|
|
25
|
+
*/
|
|
26
|
+
exports.FunctionVersionStatusEnum = {
|
|
27
|
+
PendingUpload: 'pending_upload',
|
|
28
|
+
Ready: 'ready'
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the FunctionVersion interface.
|
|
32
|
+
*/
|
|
33
|
+
function instanceOfFunctionVersion(value) {
|
|
34
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
if ((!('functionId' in value) && !('function_id' in value)) || (value['functionId'] === undefined && value['function_id'] === undefined))
|
|
37
|
+
return false;
|
|
38
|
+
if (!('status' in value) || value['status'] === undefined)
|
|
39
|
+
return false;
|
|
40
|
+
if ((!('contentHash' in value) && !('content_hash' in value)) || (value['contentHash'] === undefined && value['content_hash'] === undefined))
|
|
41
|
+
return false;
|
|
42
|
+
if ((!('pythonVersion' in value) && !('python_version' in value)) || (value['pythonVersion'] === undefined && value['python_version'] === undefined))
|
|
43
|
+
return false;
|
|
44
|
+
if ((!('cloudpickleVersion' in value) && !('cloudpickle_version' in value)) || (value['cloudpickleVersion'] === undefined && value['cloudpickle_version'] === undefined))
|
|
45
|
+
return false;
|
|
46
|
+
if (!('pip' in value) || value['pip'] === undefined)
|
|
47
|
+
return false;
|
|
48
|
+
if ((!('gpuCount' in value) && !('gpu_count' in value)) || (value['gpuCount'] === undefined && value['gpu_count'] === undefined))
|
|
49
|
+
return false;
|
|
50
|
+
if ((!('minVramGb' in value) && !('min_vram_gb' in value)) || (value['minVramGb'] === undefined && value['min_vram_gb'] === undefined))
|
|
51
|
+
return false;
|
|
52
|
+
if (!('regions' in value) || value['regions'] === undefined)
|
|
53
|
+
return false;
|
|
54
|
+
if (!('timeout' in value) || value['timeout'] === undefined)
|
|
55
|
+
return false;
|
|
56
|
+
if ((!('idleTimeout' in value) && !('idle_timeout' in value)) || (value['idleTimeout'] === undefined && value['idle_timeout'] === undefined))
|
|
57
|
+
return false;
|
|
58
|
+
if ((!('maxConcurrency' in value) && !('max_concurrency' in value)) || (value['maxConcurrency'] === undefined && value['max_concurrency'] === undefined))
|
|
59
|
+
return false;
|
|
60
|
+
if ((!('createdAt' in value) && !('created_at' in value)) || (value['createdAt'] === undefined && value['created_at'] === undefined))
|
|
61
|
+
return false;
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
function FunctionVersionFromJSON(json) {
|
|
65
|
+
return FunctionVersionFromJSONTyped(json, false);
|
|
66
|
+
}
|
|
67
|
+
function FunctionVersionFromJSONTyped(json, ignoreDiscriminator) {
|
|
68
|
+
if (json == null) {
|
|
69
|
+
return json;
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
'id': json['id'],
|
|
73
|
+
'functionId': json['function_id'],
|
|
74
|
+
'status': json['status'],
|
|
75
|
+
'contentHash': json['content_hash'],
|
|
76
|
+
'upload': json['upload'] === undefined ? undefined : json['upload'] === null ? null : (0, FunctionUpload_1.FunctionUploadFromJSON)(json['upload']),
|
|
77
|
+
'pythonVersion': json['python_version'],
|
|
78
|
+
'cloudpickleVersion': json['cloudpickle_version'],
|
|
79
|
+
'pip': json['pip'],
|
|
80
|
+
'gpu': json['gpu'] === undefined ? undefined : json['gpu'] === null ? null : json['gpu'],
|
|
81
|
+
'gpuCount': json['gpu_count'],
|
|
82
|
+
'minVramGb': json['min_vram_gb'],
|
|
83
|
+
'regions': json['regions'],
|
|
84
|
+
'maxPricePerHour': json['max_price_per_hour'] === undefined ? undefined : json['max_price_per_hour'] === null ? null : json['max_price_per_hour'],
|
|
85
|
+
'timeout': json['timeout'],
|
|
86
|
+
'idleTimeout': json['idle_timeout'],
|
|
87
|
+
'maxConcurrency': json['max_concurrency'],
|
|
88
|
+
'createdAt': (new Date(json['created_at'])),
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
function FunctionVersionToJSON(json) {
|
|
92
|
+
return FunctionVersionToJSONTyped(json, false);
|
|
93
|
+
}
|
|
94
|
+
function FunctionVersionToJSONTyped(value, ignoreDiscriminator = false) {
|
|
95
|
+
if (value == null) {
|
|
96
|
+
return value;
|
|
97
|
+
}
|
|
98
|
+
return {
|
|
99
|
+
'id': value['id'],
|
|
100
|
+
'function_id': value['functionId'],
|
|
101
|
+
'status': value['status'],
|
|
102
|
+
'content_hash': value['contentHash'],
|
|
103
|
+
'upload': (0, FunctionUpload_1.FunctionUploadToJSON)(value['upload']),
|
|
104
|
+
'python_version': value['pythonVersion'],
|
|
105
|
+
'cloudpickle_version': value['cloudpickleVersion'],
|
|
106
|
+
'pip': value['pip'],
|
|
107
|
+
'gpu': value['gpu'],
|
|
108
|
+
'gpu_count': value['gpuCount'],
|
|
109
|
+
'min_vram_gb': value['minVramGb'],
|
|
110
|
+
'regions': value['regions'],
|
|
111
|
+
'max_price_per_hour': value['maxPricePerHour'],
|
|
112
|
+
'timeout': value['timeout'],
|
|
113
|
+
'idle_timeout': value['idleTimeout'],
|
|
114
|
+
'max_concurrency': value['maxConcurrency'],
|
|
115
|
+
'created_at': value['createdAt'].toISOString(),
|
|
116
|
+
};
|
|
117
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
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 { GpuSuggestionCheaper } from './GpuSuggestionCheaper';
|
|
13
|
+
import type { GpuSuggestionGpu } from './GpuSuggestionGpu';
|
|
14
|
+
/**
|
|
15
|
+
* Whether a lower-priced GPU model would have fit an instance's observed peak GPU memory. It names GPU models and prices only.
|
|
16
|
+
*
|
|
17
|
+
* @export
|
|
18
|
+
* @interface GpuSuggestion
|
|
19
|
+
*/
|
|
20
|
+
export interface GpuSuggestion {
|
|
21
|
+
/**
|
|
22
|
+
* `suggestion` when a cheaper model fits and the saving is at least 10% and $0.05 per hour. `insufficient_data` until the instance has at least 30 samples over at least an hour. `no_cheaper_fit` otherwise.
|
|
23
|
+
*
|
|
24
|
+
* @type {GpuSuggestionStatusEnum}
|
|
25
|
+
* @memberof GpuSuggestion
|
|
26
|
+
*/
|
|
27
|
+
status: GpuSuggestionStatusEnum;
|
|
28
|
+
/**
|
|
29
|
+
* Highest GPU memory seen, in MiB. Null with no telemetry.
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof GpuSuggestion
|
|
32
|
+
*/
|
|
33
|
+
peakUsedMb: number | null;
|
|
34
|
+
/**
|
|
35
|
+
* The peak plus headroom (25% and 1024 MiB), in MiB: the memory a suggested model must have. Null until there is enough telemetry.
|
|
36
|
+
*
|
|
37
|
+
* @type {number}
|
|
38
|
+
* @memberof GpuSuggestion
|
|
39
|
+
*/
|
|
40
|
+
requiredMb: number | null;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {number}
|
|
44
|
+
* @memberof GpuSuggestion
|
|
45
|
+
*/
|
|
46
|
+
samples: number;
|
|
47
|
+
/**
|
|
48
|
+
* Minutes between the first and the latest telemetry sample.
|
|
49
|
+
* @type {number}
|
|
50
|
+
* @memberof GpuSuggestion
|
|
51
|
+
*/
|
|
52
|
+
observedMinutes: number;
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @type {GpuSuggestionGpu}
|
|
56
|
+
* @memberof GpuSuggestion
|
|
57
|
+
*/
|
|
58
|
+
current: GpuSuggestionGpu;
|
|
59
|
+
/**
|
|
60
|
+
* Set only when status is `suggestion`.
|
|
61
|
+
* @type {GpuSuggestionCheaper}
|
|
62
|
+
* @memberof GpuSuggestion
|
|
63
|
+
*/
|
|
64
|
+
suggestion: GpuSuggestionCheaper | null;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* @export
|
|
68
|
+
*/
|
|
69
|
+
export declare const GpuSuggestionStatusEnum: {
|
|
70
|
+
readonly Suggestion: "suggestion";
|
|
71
|
+
readonly InsufficientData: "insufficient_data";
|
|
72
|
+
readonly NoCheaperFit: "no_cheaper_fit";
|
|
73
|
+
};
|
|
74
|
+
export type GpuSuggestionStatusEnum = typeof GpuSuggestionStatusEnum[keyof typeof GpuSuggestionStatusEnum];
|
|
75
|
+
/**
|
|
76
|
+
* Check if a given object implements the GpuSuggestion interface.
|
|
77
|
+
*/
|
|
78
|
+
export declare function instanceOfGpuSuggestion(value: object): value is GpuSuggestion;
|
|
79
|
+
export declare function GpuSuggestionFromJSON(json: any): GpuSuggestion;
|
|
80
|
+
export declare function GpuSuggestionFromJSONTyped(json: any, ignoreDiscriminator: boolean): GpuSuggestion;
|
|
81
|
+
export declare function GpuSuggestionToJSON(json: any): GpuSuggestion;
|
|
82
|
+
export declare function GpuSuggestionToJSONTyped(value?: GpuSuggestion | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* GPU.ai Public Developer API
|
|
6
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: support@gpu.ai
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.GpuSuggestionStatusEnum = void 0;
|
|
17
|
+
exports.instanceOfGpuSuggestion = instanceOfGpuSuggestion;
|
|
18
|
+
exports.GpuSuggestionFromJSON = GpuSuggestionFromJSON;
|
|
19
|
+
exports.GpuSuggestionFromJSONTyped = GpuSuggestionFromJSONTyped;
|
|
20
|
+
exports.GpuSuggestionToJSON = GpuSuggestionToJSON;
|
|
21
|
+
exports.GpuSuggestionToJSONTyped = GpuSuggestionToJSONTyped;
|
|
22
|
+
const GpuSuggestionCheaper_1 = require("./GpuSuggestionCheaper");
|
|
23
|
+
const GpuSuggestionGpu_1 = require("./GpuSuggestionGpu");
|
|
24
|
+
/**
|
|
25
|
+
* @export
|
|
26
|
+
*/
|
|
27
|
+
exports.GpuSuggestionStatusEnum = {
|
|
28
|
+
Suggestion: 'suggestion',
|
|
29
|
+
InsufficientData: 'insufficient_data',
|
|
30
|
+
NoCheaperFit: 'no_cheaper_fit'
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Check if a given object implements the GpuSuggestion interface.
|
|
34
|
+
*/
|
|
35
|
+
function instanceOfGpuSuggestion(value) {
|
|
36
|
+
if (!('status' in value) || value['status'] === undefined)
|
|
37
|
+
return false;
|
|
38
|
+
if ((!('peakUsedMb' in value) && !('peak_used_mb' in value)) || (value['peakUsedMb'] === undefined && value['peak_used_mb'] === undefined))
|
|
39
|
+
return false;
|
|
40
|
+
if ((!('requiredMb' in value) && !('required_mb' in value)) || (value['requiredMb'] === undefined && value['required_mb'] === undefined))
|
|
41
|
+
return false;
|
|
42
|
+
if (!('samples' in value) || value['samples'] === undefined)
|
|
43
|
+
return false;
|
|
44
|
+
if ((!('observedMinutes' in value) && !('observed_minutes' in value)) || (value['observedMinutes'] === undefined && value['observed_minutes'] === undefined))
|
|
45
|
+
return false;
|
|
46
|
+
if (!('current' in value) || value['current'] === undefined)
|
|
47
|
+
return false;
|
|
48
|
+
if (!('suggestion' in value) || value['suggestion'] === undefined)
|
|
49
|
+
return false;
|
|
50
|
+
return true;
|
|
51
|
+
}
|
|
52
|
+
function GpuSuggestionFromJSON(json) {
|
|
53
|
+
return GpuSuggestionFromJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
function GpuSuggestionFromJSONTyped(json, ignoreDiscriminator) {
|
|
56
|
+
if (json == null) {
|
|
57
|
+
return json;
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
'status': json['status'],
|
|
61
|
+
'peakUsedMb': json['peak_used_mb'],
|
|
62
|
+
'requiredMb': json['required_mb'],
|
|
63
|
+
'samples': json['samples'],
|
|
64
|
+
'observedMinutes': json['observed_minutes'],
|
|
65
|
+
'current': (0, GpuSuggestionGpu_1.GpuSuggestionGpuFromJSON)(json['current']),
|
|
66
|
+
'suggestion': (0, GpuSuggestionCheaper_1.GpuSuggestionCheaperFromJSON)(json['suggestion']),
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
function GpuSuggestionToJSON(json) {
|
|
70
|
+
return GpuSuggestionToJSONTyped(json, false);
|
|
71
|
+
}
|
|
72
|
+
function GpuSuggestionToJSONTyped(value, ignoreDiscriminator = false) {
|
|
73
|
+
if (value == null) {
|
|
74
|
+
return value;
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
'status': value['status'],
|
|
78
|
+
'peak_used_mb': value['peakUsedMb'],
|
|
79
|
+
'required_mb': value['requiredMb'],
|
|
80
|
+
'samples': value['samples'],
|
|
81
|
+
'observed_minutes': value['observedMinutes'],
|
|
82
|
+
'current': (0, GpuSuggestionGpu_1.GpuSuggestionGpuToJSON)(value['current']),
|
|
83
|
+
'suggestion': (0, GpuSuggestionCheaper_1.GpuSuggestionCheaperToJSON)(value['suggestion']),
|
|
84
|
+
};
|
|
85
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
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
|
+
* The suggested GPU model and what it would save.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface GpuSuggestionCheaper
|
|
16
|
+
*/
|
|
17
|
+
export interface GpuSuggestionCheaper {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof GpuSuggestionCheaper
|
|
22
|
+
*/
|
|
23
|
+
gpuType: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof GpuSuggestionCheaper
|
|
28
|
+
*/
|
|
29
|
+
gpuName: string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof GpuSuggestionCheaper
|
|
34
|
+
*/
|
|
35
|
+
vramGb: number;
|
|
36
|
+
/**
|
|
37
|
+
* The cheapest current listing for this model, per hour.
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof GpuSuggestionCheaper
|
|
40
|
+
*/
|
|
41
|
+
pricePerHour: number;
|
|
42
|
+
/**
|
|
43
|
+
* The instance's hourly price minus this model's.
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof GpuSuggestionCheaper
|
|
46
|
+
*/
|
|
47
|
+
savingPerHour: number;
|
|
48
|
+
/**
|
|
49
|
+
* The saving as a percentage of the instance's hourly price.
|
|
50
|
+
* @type {number}
|
|
51
|
+
* @memberof GpuSuggestionCheaper
|
|
52
|
+
*/
|
|
53
|
+
savingPct: number;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Check if a given object implements the GpuSuggestionCheaper interface.
|
|
57
|
+
*/
|
|
58
|
+
export declare function instanceOfGpuSuggestionCheaper(value: object): value is GpuSuggestionCheaper;
|
|
59
|
+
export declare function GpuSuggestionCheaperFromJSON(json: any): GpuSuggestionCheaper;
|
|
60
|
+
export declare function GpuSuggestionCheaperFromJSONTyped(json: any, ignoreDiscriminator: boolean): GpuSuggestionCheaper;
|
|
61
|
+
export declare function GpuSuggestionCheaperToJSON(json: any): GpuSuggestionCheaper;
|
|
62
|
+
export declare function GpuSuggestionCheaperToJSONTyped(value?: GpuSuggestionCheaper | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* GPU.ai Public Developer API
|
|
6
|
+
* Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: support@gpu.ai
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfGpuSuggestionCheaper = instanceOfGpuSuggestionCheaper;
|
|
17
|
+
exports.GpuSuggestionCheaperFromJSON = GpuSuggestionCheaperFromJSON;
|
|
18
|
+
exports.GpuSuggestionCheaperFromJSONTyped = GpuSuggestionCheaperFromJSONTyped;
|
|
19
|
+
exports.GpuSuggestionCheaperToJSON = GpuSuggestionCheaperToJSON;
|
|
20
|
+
exports.GpuSuggestionCheaperToJSONTyped = GpuSuggestionCheaperToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the GpuSuggestionCheaper interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfGpuSuggestionCheaper(value) {
|
|
25
|
+
if ((!('gpuType' in value) && !('gpu_type' in value)) || (value['gpuType'] === undefined && value['gpu_type'] === undefined))
|
|
26
|
+
return false;
|
|
27
|
+
if ((!('gpuName' in value) && !('gpu_name' in value)) || (value['gpuName'] === undefined && value['gpu_name'] === undefined))
|
|
28
|
+
return false;
|
|
29
|
+
if ((!('vramGb' in value) && !('vram_gb' in value)) || (value['vramGb'] === undefined && value['vram_gb'] === undefined))
|
|
30
|
+
return false;
|
|
31
|
+
if ((!('pricePerHour' in value) && !('price_per_hour' in value)) || (value['pricePerHour'] === undefined && value['price_per_hour'] === undefined))
|
|
32
|
+
return false;
|
|
33
|
+
if ((!('savingPerHour' in value) && !('saving_per_hour' in value)) || (value['savingPerHour'] === undefined && value['saving_per_hour'] === undefined))
|
|
34
|
+
return false;
|
|
35
|
+
if ((!('savingPct' in value) && !('saving_pct' in value)) || (value['savingPct'] === undefined && value['saving_pct'] === undefined))
|
|
36
|
+
return false;
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
function GpuSuggestionCheaperFromJSON(json) {
|
|
40
|
+
return GpuSuggestionCheaperFromJSONTyped(json, false);
|
|
41
|
+
}
|
|
42
|
+
function GpuSuggestionCheaperFromJSONTyped(json, ignoreDiscriminator) {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
'gpuType': json['gpu_type'],
|
|
48
|
+
'gpuName': json['gpu_name'],
|
|
49
|
+
'vramGb': json['vram_gb'],
|
|
50
|
+
'pricePerHour': json['price_per_hour'],
|
|
51
|
+
'savingPerHour': json['saving_per_hour'],
|
|
52
|
+
'savingPct': json['saving_pct'],
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function GpuSuggestionCheaperToJSON(json) {
|
|
56
|
+
return GpuSuggestionCheaperToJSONTyped(json, false);
|
|
57
|
+
}
|
|
58
|
+
function GpuSuggestionCheaperToJSONTyped(value, ignoreDiscriminator = false) {
|
|
59
|
+
if (value == null) {
|
|
60
|
+
return value;
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
'gpu_type': value['gpuType'],
|
|
64
|
+
'gpu_name': value['gpuName'],
|
|
65
|
+
'vram_gb': value['vramGb'],
|
|
66
|
+
'price_per_hour': value['pricePerHour'],
|
|
67
|
+
'saving_per_hour': value['savingPerHour'],
|
|
68
|
+
'saving_pct': value['savingPct'],
|
|
69
|
+
};
|
|
70
|
+
}
|