@gpuai/sdk 0.3.17 → 0.4.0
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 +40 -0
- package/README.md +36 -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/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/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/AutolaunchRule.d.ts +4 -2
- 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/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 +19 -0
- package/dist/esm/models/index.js +19 -0
- package/dist/esm/runtime.js +1 -1
- package/dist/models/AutolaunchRule.d.ts +4 -2
- 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/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 +19 -0
- package/dist/models/index.js +19 -0
- package/dist/runtime.js +1 -1
- package/docs/AutolaunchApi.md +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/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/index.ts +1 -0
- package/src/models/AutolaunchRule.ts +4 -2
- 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/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 +19 -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,68 @@
|
|
|
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 Invoice
|
|
16
|
+
*/
|
|
17
|
+
export interface Invoice {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof Invoice
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof Invoice
|
|
28
|
+
*/
|
|
29
|
+
number: string;
|
|
30
|
+
/**
|
|
31
|
+
* The payment date, which is also the invoice date.
|
|
32
|
+
* @type {Date}
|
|
33
|
+
* @memberof Invoice
|
|
34
|
+
*/
|
|
35
|
+
issuedAt: Date;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof Invoice
|
|
40
|
+
*/
|
|
41
|
+
amountCents: number;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof Invoice
|
|
46
|
+
*/
|
|
47
|
+
currency: string;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof Invoice
|
|
52
|
+
*/
|
|
53
|
+
paymentMethod: string;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof Invoice
|
|
58
|
+
*/
|
|
59
|
+
description: string;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Check if a given object implements the Invoice interface.
|
|
63
|
+
*/
|
|
64
|
+
export declare function instanceOfInvoice(value: object): value is Invoice;
|
|
65
|
+
export declare function InvoiceFromJSON(json: any): Invoice;
|
|
66
|
+
export declare function InvoiceFromJSONTyped(json: any, ignoreDiscriminator: boolean): Invoice;
|
|
67
|
+
export declare function InvoiceToJSON(json: any): Invoice;
|
|
68
|
+
export declare function InvoiceToJSONTyped(value?: Invoice | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,74 @@
|
|
|
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.instanceOfInvoice = instanceOfInvoice;
|
|
17
|
+
exports.InvoiceFromJSON = InvoiceFromJSON;
|
|
18
|
+
exports.InvoiceFromJSONTyped = InvoiceFromJSONTyped;
|
|
19
|
+
exports.InvoiceToJSON = InvoiceToJSON;
|
|
20
|
+
exports.InvoiceToJSONTyped = InvoiceToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the Invoice interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfInvoice(value) {
|
|
25
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('number' in value) || value['number'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if ((!('issuedAt' in value) && !('issued_at' in value)) || (value['issuedAt'] === undefined && value['issued_at'] === undefined))
|
|
30
|
+
return false;
|
|
31
|
+
if ((!('amountCents' in value) && !('amount_cents' in value)) || (value['amountCents'] === undefined && value['amount_cents'] === undefined))
|
|
32
|
+
return false;
|
|
33
|
+
if (!('currency' in value) || value['currency'] === undefined)
|
|
34
|
+
return false;
|
|
35
|
+
if ((!('paymentMethod' in value) && !('payment_method' in value)) || (value['paymentMethod'] === undefined && value['payment_method'] === undefined))
|
|
36
|
+
return false;
|
|
37
|
+
if (!('description' in value) || value['description'] === undefined)
|
|
38
|
+
return false;
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
function InvoiceFromJSON(json) {
|
|
42
|
+
return InvoiceFromJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
function InvoiceFromJSONTyped(json, ignoreDiscriminator) {
|
|
45
|
+
if (json == null) {
|
|
46
|
+
return json;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'id': json['id'],
|
|
50
|
+
'number': json['number'],
|
|
51
|
+
'issuedAt': (new Date(json['issued_at'])),
|
|
52
|
+
'amountCents': json['amount_cents'],
|
|
53
|
+
'currency': json['currency'],
|
|
54
|
+
'paymentMethod': json['payment_method'],
|
|
55
|
+
'description': json['description'],
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function InvoiceToJSON(json) {
|
|
59
|
+
return InvoiceToJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
function InvoiceToJSONTyped(value, ignoreDiscriminator = false) {
|
|
62
|
+
if (value == null) {
|
|
63
|
+
return value;
|
|
64
|
+
}
|
|
65
|
+
return {
|
|
66
|
+
'id': value['id'],
|
|
67
|
+
'number': value['number'],
|
|
68
|
+
'issued_at': value['issuedAt'].toISOString(),
|
|
69
|
+
'amount_cents': value['amountCents'],
|
|
70
|
+
'currency': value['currency'],
|
|
71
|
+
'payment_method': value['paymentMethod'],
|
|
72
|
+
'description': value['description'],
|
|
73
|
+
};
|
|
74
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
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 { Invoice } from './Invoice';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface InvoiceList
|
|
17
|
+
*/
|
|
18
|
+
export interface InvoiceList {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {Array<Invoice>}
|
|
22
|
+
* @memberof InvoiceList
|
|
23
|
+
*/
|
|
24
|
+
invoices: Array<Invoice>;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {boolean}
|
|
28
|
+
* @memberof InvoiceList
|
|
29
|
+
*/
|
|
30
|
+
hasMore: boolean;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof InvoiceList
|
|
35
|
+
*/
|
|
36
|
+
nextCursor?: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the InvoiceList interface.
|
|
40
|
+
*/
|
|
41
|
+
export declare function instanceOfInvoiceList(value: object): value is InvoiceList;
|
|
42
|
+
export declare function InvoiceListFromJSON(json: any): InvoiceList;
|
|
43
|
+
export declare function InvoiceListFromJSONTyped(json: any, ignoreDiscriminator: boolean): InvoiceList;
|
|
44
|
+
export declare function InvoiceListToJSON(json: any): InvoiceList;
|
|
45
|
+
export declare function InvoiceListToJSONTyped(value?: InvoiceList | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,57 @@
|
|
|
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.instanceOfInvoiceList = instanceOfInvoiceList;
|
|
17
|
+
exports.InvoiceListFromJSON = InvoiceListFromJSON;
|
|
18
|
+
exports.InvoiceListFromJSONTyped = InvoiceListFromJSONTyped;
|
|
19
|
+
exports.InvoiceListToJSON = InvoiceListToJSON;
|
|
20
|
+
exports.InvoiceListToJSONTyped = InvoiceListToJSONTyped;
|
|
21
|
+
const Invoice_1 = require("./Invoice");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the InvoiceList interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfInvoiceList(value) {
|
|
26
|
+
if (!('invoices' in value) || value['invoices'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if ((!('hasMore' in value) && !('has_more' in value)) || (value['hasMore'] === undefined && value['has_more'] === undefined))
|
|
29
|
+
return false;
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
function InvoiceListFromJSON(json) {
|
|
33
|
+
return InvoiceListFromJSONTyped(json, false);
|
|
34
|
+
}
|
|
35
|
+
function InvoiceListFromJSONTyped(json, ignoreDiscriminator) {
|
|
36
|
+
if (json == null) {
|
|
37
|
+
return json;
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
'invoices': (json['invoices'].map(Invoice_1.InvoiceFromJSON)),
|
|
41
|
+
'hasMore': json['has_more'],
|
|
42
|
+
'nextCursor': json['next_cursor'] == null ? undefined : json['next_cursor'],
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function InvoiceListToJSON(json) {
|
|
46
|
+
return InvoiceListToJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
function InvoiceListToJSONTyped(value, ignoreDiscriminator = false) {
|
|
49
|
+
if (value == null) {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
'invoices': (value['invoices'].map(Invoice_1.InvoiceToJSON)),
|
|
54
|
+
'has_more': value['hasMore'],
|
|
55
|
+
'next_cursor': value['nextCursor'],
|
|
56
|
+
};
|
|
57
|
+
}
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { ModelRate } from './ModelRate';
|
|
13
|
+
import type { PeakWindow } from './PeakWindow';
|
|
12
14
|
/**
|
|
13
15
|
*
|
|
14
16
|
* @export
|
|
@@ -33,6 +35,18 @@ export interface ModelPricing {
|
|
|
33
35
|
* @memberof ModelPricing
|
|
34
36
|
*/
|
|
35
37
|
outputPer1mTokensCents?: number;
|
|
38
|
+
/**
|
|
39
|
+
* Exact per-1M-token rate in micro-cents (1e-6 cent) for the cache-HIT part of a chat prompt (usage.prompt_tokens_details.cached_tokens). Present only on models with a published cached-input rate; absent means no discount — every prompt token bills at input_per_1m_tokens_cents. Treat this field as the presence signal: cached rates are routinely sub-cent, so the rounded cents field below is often omitted.
|
|
40
|
+
* @type {number}
|
|
41
|
+
* @memberof ModelPricing
|
|
42
|
+
*/
|
|
43
|
+
cachedInputPer1mTokensMicrocents?: number;
|
|
44
|
+
/**
|
|
45
|
+
* cached_input_per_1m_tokens_microcents rounded to whole cents; omitted when the exact rate rounds below half a cent.
|
|
46
|
+
* @type {number}
|
|
47
|
+
* @memberof ModelPricing
|
|
48
|
+
*/
|
|
49
|
+
cachedInputPer1mTokensCents?: number;
|
|
36
50
|
/**
|
|
37
51
|
*
|
|
38
52
|
* @type {number}
|
|
@@ -69,7 +83,39 @@ export interface ModelPricing {
|
|
|
69
83
|
* @memberof ModelPricing
|
|
70
84
|
*/
|
|
71
85
|
perVideoSecondMicrocents?: number;
|
|
86
|
+
/**
|
|
87
|
+
* Present only on a model priced by time of day. Which side of the peak schedule the instant this response was rendered falls on; the flat rate fields above are the rates in effect at that instant. A request is billed at the rate in effect when it ARRIVES (UTC), so a caller planning a call for later should price it from `peak` / `off_peak` and `peak_windows_utc`.
|
|
88
|
+
* @type {ModelPricingPeriodEnum}
|
|
89
|
+
* @memberof ModelPricing
|
|
90
|
+
*/
|
|
91
|
+
period?: ModelPricingPeriodEnum;
|
|
92
|
+
/**
|
|
93
|
+
* The daily UTC ranges during which the `peak` rates apply, start inclusive and end exclusive ("24:00" is a valid end; a range whose end sorts before its start wraps midnight). Present only on a model priced by time of day.
|
|
94
|
+
* @type {Array<PeakWindow>}
|
|
95
|
+
* @memberof ModelPricing
|
|
96
|
+
*/
|
|
97
|
+
peakWindowsUtc?: Array<PeakWindow>;
|
|
98
|
+
/**
|
|
99
|
+
*
|
|
100
|
+
* @type {ModelRate}
|
|
101
|
+
* @memberof ModelPricing
|
|
102
|
+
*/
|
|
103
|
+
peak?: ModelRate;
|
|
104
|
+
/**
|
|
105
|
+
*
|
|
106
|
+
* @type {ModelRate}
|
|
107
|
+
* @memberof ModelPricing
|
|
108
|
+
*/
|
|
109
|
+
offPeak?: ModelRate;
|
|
72
110
|
}
|
|
111
|
+
/**
|
|
112
|
+
* @export
|
|
113
|
+
*/
|
|
114
|
+
export declare const ModelPricingPeriodEnum: {
|
|
115
|
+
readonly Peak: "peak";
|
|
116
|
+
readonly OffPeak: "off_peak";
|
|
117
|
+
};
|
|
118
|
+
export type ModelPricingPeriodEnum = typeof ModelPricingPeriodEnum[keyof typeof ModelPricingPeriodEnum];
|
|
73
119
|
/**
|
|
74
120
|
* Check if a given object implements the ModelPricing interface.
|
|
75
121
|
*/
|