@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.
Files changed (187) hide show
  1. package/.openapi-generator/FILES +48 -0
  2. package/README.md +41 -2
  3. package/dist/apis/BillingApi.d.ts +70 -0
  4. package/dist/apis/BillingApi.js +197 -0
  5. package/dist/apis/FunctionsApi.d.ts +228 -0
  6. package/dist/apis/FunctionsApi.js +627 -0
  7. package/dist/apis/InstancesApi.d.ts +18 -0
  8. package/dist/apis/InstancesApi.js +49 -0
  9. package/dist/apis/index.d.ts +1 -0
  10. package/dist/apis/index.js +1 -0
  11. package/dist/esm/apis/BillingApi.d.ts +70 -0
  12. package/dist/esm/apis/BillingApi.js +197 -0
  13. package/dist/esm/apis/FunctionsApi.d.ts +228 -0
  14. package/dist/esm/apis/FunctionsApi.js +623 -0
  15. package/dist/esm/apis/InstancesApi.d.ts +18 -0
  16. package/dist/esm/apis/InstancesApi.js +49 -0
  17. package/dist/esm/apis/index.d.ts +1 -0
  18. package/dist/esm/apis/index.js +1 -0
  19. package/dist/esm/models/AutolaunchRule.d.ts +2 -1
  20. package/dist/esm/models/BillingDetails.d.ts +98 -0
  21. package/dist/esm/models/BillingDetails.js +85 -0
  22. package/dist/esm/models/CreateFunctionRequest.d.ts +32 -0
  23. package/dist/esm/models/CreateFunctionRequest.js +43 -0
  24. package/dist/esm/models/CreateFunctionRunRequest.d.ts +38 -0
  25. package/dist/esm/models/CreateFunctionRunRequest.js +45 -0
  26. package/dist/esm/models/CreateFunctionVersionRequest.d.ts +110 -0
  27. package/dist/esm/models/CreateFunctionVersionRequest.js +79 -0
  28. package/dist/esm/models/Function.d.ts +163 -0
  29. package/dist/esm/models/Function.js +109 -0
  30. package/dist/esm/models/FunctionList.d.ts +33 -0
  31. package/dist/esm/models/FunctionList.js +44 -0
  32. package/dist/esm/models/FunctionReplicaCounts.d.ts +44 -0
  33. package/dist/esm/models/FunctionReplicaCounts.js +51 -0
  34. package/dist/esm/models/FunctionRun.d.ts +130 -0
  35. package/dist/esm/models/FunctionRun.js +94 -0
  36. package/dist/esm/models/FunctionRunError.d.ts +44 -0
  37. package/dist/esm/models/FunctionRunError.js +49 -0
  38. package/dist/esm/models/FunctionRunList.d.ts +39 -0
  39. package/dist/esm/models/FunctionRunList.js +48 -0
  40. package/dist/esm/models/FunctionRunLogChunk.d.ts +59 -0
  41. package/dist/esm/models/FunctionRunLogChunk.js +63 -0
  42. package/dist/esm/models/FunctionRunLogs.d.ts +45 -0
  43. package/dist/esm/models/FunctionRunLogs.js +52 -0
  44. package/dist/esm/models/FunctionUpload.d.ts +51 -0
  45. package/dist/esm/models/FunctionUpload.js +59 -0
  46. package/dist/esm/models/FunctionVersion.d.ts +137 -0
  47. package/dist/esm/models/FunctionVersion.js +109 -0
  48. package/dist/esm/models/GpuSuggestion.d.ts +82 -0
  49. package/dist/esm/models/GpuSuggestion.js +77 -0
  50. package/dist/esm/models/GpuSuggestionCheaper.d.ts +62 -0
  51. package/dist/esm/models/GpuSuggestionCheaper.js +63 -0
  52. package/dist/esm/models/GpuSuggestionGpu.d.ts +50 -0
  53. package/dist/esm/models/GpuSuggestionGpu.js +55 -0
  54. package/dist/esm/models/Instance.d.ts +7 -0
  55. package/dist/esm/models/Instance.js +3 -0
  56. package/dist/esm/models/InstanceGpuMemory.d.ts +51 -0
  57. package/dist/esm/models/InstanceGpuMemory.js +55 -0
  58. package/dist/esm/models/Invoice.d.ts +68 -0
  59. package/dist/esm/models/Invoice.js +67 -0
  60. package/dist/esm/models/InvoiceList.d.ts +45 -0
  61. package/dist/esm/models/InvoiceList.js +50 -0
  62. package/dist/esm/models/ModelPricing.d.ts +46 -0
  63. package/dist/esm/models/ModelPricing.js +21 -0
  64. package/dist/esm/models/ModelRate.d.ts +62 -0
  65. package/dist/esm/models/ModelRate.js +51 -0
  66. package/dist/esm/models/PeakWindow.d.ts +38 -0
  67. package/dist/esm/models/PeakWindow.js +47 -0
  68. package/dist/esm/models/UpdateBillingDetailsRequest.d.ts +80 -0
  69. package/dist/esm/models/UpdateBillingDetailsRequest.js +57 -0
  70. package/dist/esm/models/index.d.ts +23 -0
  71. package/dist/esm/models/index.js +23 -0
  72. package/dist/esm/runtime.js +1 -1
  73. package/dist/models/AutolaunchRule.d.ts +2 -1
  74. package/dist/models/BillingDetails.d.ts +98 -0
  75. package/dist/models/BillingDetails.js +92 -0
  76. package/dist/models/CreateFunctionRequest.d.ts +32 -0
  77. package/dist/models/CreateFunctionRequest.js +50 -0
  78. package/dist/models/CreateFunctionRunRequest.d.ts +38 -0
  79. package/dist/models/CreateFunctionRunRequest.js +52 -0
  80. package/dist/models/CreateFunctionVersionRequest.d.ts +110 -0
  81. package/dist/models/CreateFunctionVersionRequest.js +86 -0
  82. package/dist/models/Function.d.ts +163 -0
  83. package/dist/models/Function.js +117 -0
  84. package/dist/models/FunctionList.d.ts +33 -0
  85. package/dist/models/FunctionList.js +51 -0
  86. package/dist/models/FunctionReplicaCounts.d.ts +44 -0
  87. package/dist/models/FunctionReplicaCounts.js +58 -0
  88. package/dist/models/FunctionRun.d.ts +130 -0
  89. package/dist/models/FunctionRun.js +102 -0
  90. package/dist/models/FunctionRunError.d.ts +44 -0
  91. package/dist/models/FunctionRunError.js +56 -0
  92. package/dist/models/FunctionRunList.d.ts +39 -0
  93. package/dist/models/FunctionRunList.js +55 -0
  94. package/dist/models/FunctionRunLogChunk.d.ts +59 -0
  95. package/dist/models/FunctionRunLogChunk.js +71 -0
  96. package/dist/models/FunctionRunLogs.d.ts +45 -0
  97. package/dist/models/FunctionRunLogs.js +59 -0
  98. package/dist/models/FunctionUpload.d.ts +51 -0
  99. package/dist/models/FunctionUpload.js +67 -0
  100. package/dist/models/FunctionVersion.d.ts +137 -0
  101. package/dist/models/FunctionVersion.js +117 -0
  102. package/dist/models/GpuSuggestion.d.ts +82 -0
  103. package/dist/models/GpuSuggestion.js +85 -0
  104. package/dist/models/GpuSuggestionCheaper.d.ts +62 -0
  105. package/dist/models/GpuSuggestionCheaper.js +70 -0
  106. package/dist/models/GpuSuggestionGpu.d.ts +50 -0
  107. package/dist/models/GpuSuggestionGpu.js +62 -0
  108. package/dist/models/Instance.d.ts +7 -0
  109. package/dist/models/Instance.js +3 -0
  110. package/dist/models/InstanceGpuMemory.d.ts +51 -0
  111. package/dist/models/InstanceGpuMemory.js +62 -0
  112. package/dist/models/Invoice.d.ts +68 -0
  113. package/dist/models/Invoice.js +74 -0
  114. package/dist/models/InvoiceList.d.ts +45 -0
  115. package/dist/models/InvoiceList.js +57 -0
  116. package/dist/models/ModelPricing.d.ts +46 -0
  117. package/dist/models/ModelPricing.js +22 -0
  118. package/dist/models/ModelRate.d.ts +62 -0
  119. package/dist/models/ModelRate.js +58 -0
  120. package/dist/models/PeakWindow.d.ts +38 -0
  121. package/dist/models/PeakWindow.js +54 -0
  122. package/dist/models/UpdateBillingDetailsRequest.d.ts +80 -0
  123. package/dist/models/UpdateBillingDetailsRequest.js +64 -0
  124. package/dist/models/index.d.ts +23 -0
  125. package/dist/models/index.js +23 -0
  126. package/dist/runtime.js +1 -1
  127. package/docs/BillingApi.md +299 -0
  128. package/docs/BillingDetails.md +56 -0
  129. package/docs/CreateFunctionRequest.md +34 -0
  130. package/docs/CreateFunctionRunRequest.md +36 -0
  131. package/docs/CreateFunctionVersionRequest.md +60 -0
  132. package/docs/Function.md +75 -0
  133. package/docs/FunctionList.md +34 -0
  134. package/docs/FunctionReplicaCounts.md +39 -0
  135. package/docs/FunctionRun.md +63 -0
  136. package/docs/FunctionRunError.md +38 -0
  137. package/docs/FunctionRunList.md +36 -0
  138. package/docs/FunctionRunLogChunk.md +40 -0
  139. package/docs/FunctionRunLogs.md +38 -0
  140. package/docs/FunctionUpload.md +38 -0
  141. package/docs/FunctionVersion.md +66 -0
  142. package/docs/FunctionsApi.md +880 -0
  143. package/docs/GpuSuggestion.md +47 -0
  144. package/docs/GpuSuggestionCheaper.md +45 -0
  145. package/docs/GpuSuggestionGpu.md +41 -0
  146. package/docs/Instance.md +2 -0
  147. package/docs/InstanceGpuMemory.md +41 -0
  148. package/docs/InstancesApi.md +75 -0
  149. package/docs/Invoice.md +46 -0
  150. package/docs/InvoiceList.md +38 -0
  151. package/docs/ModelPricing.md +12 -0
  152. package/docs/ModelRate.md +45 -0
  153. package/docs/PeakWindow.md +37 -0
  154. package/docs/UpdateBillingDetailsRequest.md +50 -0
  155. package/package.json +1 -1
  156. package/src/apis/BillingApi.ts +247 -0
  157. package/src/apis/FunctionsApi.ts +828 -0
  158. package/src/apis/InstancesApi.ts +64 -0
  159. package/src/apis/index.ts +1 -0
  160. package/src/models/AutolaunchRule.ts +2 -1
  161. package/src/models/BillingDetails.ts +164 -0
  162. package/src/models/CreateFunctionRequest.ts +66 -0
  163. package/src/models/CreateFunctionRunRequest.ts +74 -0
  164. package/src/models/CreateFunctionVersionRequest.ts +175 -0
  165. package/src/models/Function.ts +255 -0
  166. package/src/models/FunctionList.ts +74 -0
  167. package/src/models/FunctionReplicaCounts.ts +84 -0
  168. package/src/models/FunctionRun.ts +207 -0
  169. package/src/models/FunctionRunError.ts +83 -0
  170. package/src/models/FunctionRunList.ts +83 -0
  171. package/src/models/FunctionRunLogChunk.ts +105 -0
  172. package/src/models/FunctionRunLogs.ts +92 -0
  173. package/src/models/FunctionUpload.ts +96 -0
  174. package/src/models/FunctionVersion.ts +226 -0
  175. package/src/models/GpuSuggestion.ts +150 -0
  176. package/src/models/GpuSuggestionCheaper.ts +111 -0
  177. package/src/models/GpuSuggestionGpu.ts +93 -0
  178. package/src/models/Instance.ts +15 -0
  179. package/src/models/InstanceGpuMemory.ts +94 -0
  180. package/src/models/Invoice.ts +120 -0
  181. package/src/models/InvoiceList.ts +91 -0
  182. package/src/models/ModelPricing.ts +74 -0
  183. package/src/models/ModelRate.ts +105 -0
  184. package/src/models/PeakWindow.ts +75 -0
  185. package/src/models/UpdateBillingDetailsRequest.ts +129 -0
  186. package/src/models/index.ts +23 -0
  187. package/src/runtime.ts +1 -1
@@ -0,0 +1,110 @@
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 CreateFunctionVersionRequest
16
+ */
17
+ export interface CreateFunctionVersionRequest {
18
+ /**
19
+ * Lowercase hex SHA-256 over the code and everything declared about it.
20
+ * @type {string}
21
+ * @memberof CreateFunctionVersionRequest
22
+ */
23
+ contentHash: string;
24
+ /**
25
+ * Lowercase hex SHA-256 of the pickled function.
26
+ * @type {string}
27
+ * @memberof CreateFunctionVersionRequest
28
+ */
29
+ bundleSha256: string;
30
+ /**
31
+ * Size of the pickled function. 64 MB at most.
32
+ * @type {number}
33
+ * @memberof CreateFunctionVersionRequest
34
+ */
35
+ bundleBytes: number;
36
+ /**
37
+ * The Python minor version the function was pickled with, such as "3.11".
38
+ * @type {string}
39
+ * @memberof CreateFunctionVersionRequest
40
+ */
41
+ pythonVersion: string;
42
+ /**
43
+ *
44
+ * @type {string}
45
+ * @memberof CreateFunctionVersionRequest
46
+ */
47
+ cloudpickleVersion: string;
48
+ /**
49
+ * Requirements to install on the machine. Options (anything starting with "-") are refused.
50
+ * @type {Array<string>}
51
+ * @memberof CreateFunctionVersionRequest
52
+ */
53
+ pip?: Array<string>;
54
+ /**
55
+ * A GPU type from GET /gpu-types. Omit to use the cheapest GPU that fits.
56
+ * @type {string}
57
+ * @memberof CreateFunctionVersionRequest
58
+ */
59
+ gpu?: string;
60
+ /**
61
+ *
62
+ * @type {number}
63
+ * @memberof CreateFunctionVersionRequest
64
+ */
65
+ gpuCount?: number;
66
+ /**
67
+ * Least VRAM per GPU, used when gpu is omitted.
68
+ * @type {number}
69
+ * @memberof CreateFunctionVersionRequest
70
+ */
71
+ minVramGb?: number;
72
+ /**
73
+ *
74
+ * @type {Array<string>}
75
+ * @memberof CreateFunctionVersionRequest
76
+ */
77
+ regions?: Array<string>;
78
+ /**
79
+ *
80
+ * @type {number}
81
+ * @memberof CreateFunctionVersionRequest
82
+ */
83
+ maxPricePerHour?: number;
84
+ /**
85
+ * Seconds one call may run. 1 to 86400.
86
+ * @type {number}
87
+ * @memberof CreateFunctionVersionRequest
88
+ */
89
+ timeout: number;
90
+ /**
91
+ * Seconds a machine stays ready after a call. 0 releases it at once.
92
+ * @type {number}
93
+ * @memberof CreateFunctionVersionRequest
94
+ */
95
+ idleTimeout?: number;
96
+ /**
97
+ *
98
+ * @type {number}
99
+ * @memberof CreateFunctionVersionRequest
100
+ */
101
+ maxConcurrency?: number;
102
+ }
103
+ /**
104
+ * Check if a given object implements the CreateFunctionVersionRequest interface.
105
+ */
106
+ export declare function instanceOfCreateFunctionVersionRequest(value: object): value is CreateFunctionVersionRequest;
107
+ export declare function CreateFunctionVersionRequestFromJSON(json: any): CreateFunctionVersionRequest;
108
+ export declare function CreateFunctionVersionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateFunctionVersionRequest;
109
+ export declare function CreateFunctionVersionRequestToJSON(json: any): CreateFunctionVersionRequest;
110
+ export declare function CreateFunctionVersionRequestToJSONTyped(value?: CreateFunctionVersionRequest | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,86 @@
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.instanceOfCreateFunctionVersionRequest = instanceOfCreateFunctionVersionRequest;
17
+ exports.CreateFunctionVersionRequestFromJSON = CreateFunctionVersionRequestFromJSON;
18
+ exports.CreateFunctionVersionRequestFromJSONTyped = CreateFunctionVersionRequestFromJSONTyped;
19
+ exports.CreateFunctionVersionRequestToJSON = CreateFunctionVersionRequestToJSON;
20
+ exports.CreateFunctionVersionRequestToJSONTyped = CreateFunctionVersionRequestToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the CreateFunctionVersionRequest interface.
23
+ */
24
+ function instanceOfCreateFunctionVersionRequest(value) {
25
+ if ((!('contentHash' in value) && !('content_hash' in value)) || (value['contentHash'] === undefined && value['content_hash'] === undefined))
26
+ return false;
27
+ if ((!('bundleSha256' in value) && !('bundle_sha256' in value)) || (value['bundleSha256'] === undefined && value['bundle_sha256'] === undefined))
28
+ return false;
29
+ if ((!('bundleBytes' in value) && !('bundle_bytes' in value)) || (value['bundleBytes'] === undefined && value['bundle_bytes'] === undefined))
30
+ return false;
31
+ if ((!('pythonVersion' in value) && !('python_version' in value)) || (value['pythonVersion'] === undefined && value['python_version'] === undefined))
32
+ return false;
33
+ if ((!('cloudpickleVersion' in value) && !('cloudpickle_version' in value)) || (value['cloudpickleVersion'] === undefined && value['cloudpickle_version'] === undefined))
34
+ return false;
35
+ if (!('timeout' in value) || value['timeout'] === undefined)
36
+ return false;
37
+ return true;
38
+ }
39
+ function CreateFunctionVersionRequestFromJSON(json) {
40
+ return CreateFunctionVersionRequestFromJSONTyped(json, false);
41
+ }
42
+ function CreateFunctionVersionRequestFromJSONTyped(json, ignoreDiscriminator) {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+ 'contentHash': json['content_hash'],
48
+ 'bundleSha256': json['bundle_sha256'],
49
+ 'bundleBytes': json['bundle_bytes'],
50
+ 'pythonVersion': json['python_version'],
51
+ 'cloudpickleVersion': json['cloudpickle_version'],
52
+ 'pip': json['pip'] == null ? undefined : json['pip'],
53
+ 'gpu': json['gpu'] == null ? undefined : json['gpu'],
54
+ 'gpuCount': json['gpu_count'] == null ? undefined : json['gpu_count'],
55
+ 'minVramGb': json['min_vram_gb'] == null ? undefined : json['min_vram_gb'],
56
+ 'regions': json['regions'] == null ? undefined : json['regions'],
57
+ 'maxPricePerHour': json['max_price_per_hour'] == null ? undefined : json['max_price_per_hour'],
58
+ 'timeout': json['timeout'],
59
+ 'idleTimeout': json['idle_timeout'] == null ? undefined : json['idle_timeout'],
60
+ 'maxConcurrency': json['max_concurrency'] == null ? undefined : json['max_concurrency'],
61
+ };
62
+ }
63
+ function CreateFunctionVersionRequestToJSON(json) {
64
+ return CreateFunctionVersionRequestToJSONTyped(json, false);
65
+ }
66
+ function CreateFunctionVersionRequestToJSONTyped(value, ignoreDiscriminator = false) {
67
+ if (value == null) {
68
+ return value;
69
+ }
70
+ return {
71
+ 'content_hash': value['contentHash'],
72
+ 'bundle_sha256': value['bundleSha256'],
73
+ 'bundle_bytes': value['bundleBytes'],
74
+ 'python_version': value['pythonVersion'],
75
+ 'cloudpickle_version': value['cloudpickleVersion'],
76
+ 'pip': value['pip'],
77
+ 'gpu': value['gpu'],
78
+ 'gpu_count': value['gpuCount'],
79
+ 'min_vram_gb': value['minVramGb'],
80
+ 'regions': value['regions'],
81
+ 'max_price_per_hour': value['maxPricePerHour'],
82
+ 'timeout': value['timeout'],
83
+ 'idle_timeout': value['idleTimeout'],
84
+ 'max_concurrency': value['maxConcurrency'],
85
+ };
86
+ }
@@ -0,0 +1,163 @@
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 { FunctionReplicaCounts } from './FunctionReplicaCounts';
13
+ /**
14
+ * A Python function registered with GPU.ai. The settings are those of its current version and are null until the first version is uploaded.
15
+ * @export
16
+ * @interface Function
17
+ */
18
+ export interface Function {
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof Function
23
+ */
24
+ id: string;
25
+ /**
26
+ *
27
+ * @type {string}
28
+ * @memberof Function
29
+ */
30
+ name: string;
31
+ /**
32
+ * `running`: a call is executing. `warm`: a machine is ready and waiting. `starting`: a machine is being started. `idle`: no machine, nothing is billed.
33
+ * @type {FunctionStatusEnum}
34
+ * @memberof Function
35
+ */
36
+ status: FunctionStatusEnum;
37
+ /**
38
+ *
39
+ * @type {string}
40
+ * @memberof Function
41
+ */
42
+ currentVersionId?: string | null;
43
+ /**
44
+ * The GPU type, or null when the cheapest GPU that fits is used.
45
+ * @type {string}
46
+ * @memberof Function
47
+ */
48
+ gpu?: string | null;
49
+ /**
50
+ *
51
+ * @type {number}
52
+ * @memberof Function
53
+ */
54
+ gpuCount?: number | null;
55
+ /**
56
+ *
57
+ * @type {number}
58
+ * @memberof Function
59
+ */
60
+ minVramGb?: number | null;
61
+ /**
62
+ *
63
+ * @type {Array<string>}
64
+ * @memberof Function
65
+ */
66
+ regions?: Array<string>;
67
+ /**
68
+ *
69
+ * @type {number}
70
+ * @memberof Function
71
+ */
72
+ maxPricePerHour?: number | null;
73
+ /**
74
+ *
75
+ * @type {string}
76
+ * @memberof Function
77
+ */
78
+ pythonVersion?: string | null;
79
+ /**
80
+ *
81
+ * @type {Array<string>}
82
+ * @memberof Function
83
+ */
84
+ pip?: Array<string>;
85
+ /**
86
+ * Seconds one call may run before it is stopped.
87
+ * @type {number}
88
+ * @memberof Function
89
+ */
90
+ timeout?: number | null;
91
+ /**
92
+ * Seconds a machine stays ready after a call.
93
+ * @type {number}
94
+ * @memberof Function
95
+ */
96
+ idleTimeout?: number | null;
97
+ /**
98
+ * Most machines running calls at once.
99
+ * @type {number}
100
+ * @memberof Function
101
+ */
102
+ maxConcurrency?: number | null;
103
+ /**
104
+ *
105
+ * @type {FunctionReplicaCounts}
106
+ * @memberof Function
107
+ */
108
+ replicas: FunctionReplicaCounts;
109
+ /**
110
+ *
111
+ * @type {number}
112
+ * @memberof Function
113
+ */
114
+ runsQueued: number;
115
+ /**
116
+ *
117
+ * @type {number}
118
+ * @memberof Function
119
+ */
120
+ runs24h: number;
121
+ /**
122
+ * Sum of the cost of the runs created in the last 24 hours.
123
+ * @type {number}
124
+ * @memberof Function
125
+ */
126
+ runCost24hUsd: number;
127
+ /**
128
+ * What the function's machines were billed in the last 24 hours, including start-up and idle time that belongs to no run.
129
+ * @type {number}
130
+ * @memberof Function
131
+ */
132
+ machineCost24hUsd: number;
133
+ /**
134
+ *
135
+ * @type {Date}
136
+ * @memberof Function
137
+ */
138
+ lastRunAt?: Date | null;
139
+ /**
140
+ *
141
+ * @type {Date}
142
+ * @memberof Function
143
+ */
144
+ createdAt: Date;
145
+ }
146
+ /**
147
+ * @export
148
+ */
149
+ export declare const FunctionStatusEnum: {
150
+ readonly Idle: "idle";
151
+ readonly Starting: "starting";
152
+ readonly Warm: "warm";
153
+ readonly Running: "running";
154
+ };
155
+ export type FunctionStatusEnum = typeof FunctionStatusEnum[keyof typeof FunctionStatusEnum];
156
+ /**
157
+ * Check if a given object implements the Function interface.
158
+ */
159
+ export declare function instanceOfFunction(value: object): value is Function;
160
+ export declare function FunctionFromJSON(json: any): Function;
161
+ export declare function FunctionFromJSONTyped(json: any, ignoreDiscriminator: boolean): Function;
162
+ export declare function FunctionToJSON(json: any): Function;
163
+ export declare function FunctionToJSONTyped(value?: Function | 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.FunctionStatusEnum = void 0;
17
+ exports.instanceOfFunction = instanceOfFunction;
18
+ exports.FunctionFromJSON = FunctionFromJSON;
19
+ exports.FunctionFromJSONTyped = FunctionFromJSONTyped;
20
+ exports.FunctionToJSON = FunctionToJSON;
21
+ exports.FunctionToJSONTyped = FunctionToJSONTyped;
22
+ const FunctionReplicaCounts_1 = require("./FunctionReplicaCounts");
23
+ /**
24
+ * @export
25
+ */
26
+ exports.FunctionStatusEnum = {
27
+ Idle: 'idle',
28
+ Starting: 'starting',
29
+ Warm: 'warm',
30
+ Running: 'running'
31
+ };
32
+ /**
33
+ * Check if a given object implements the Function interface.
34
+ */
35
+ function instanceOfFunction(value) {
36
+ if (!('id' in value) || value['id'] === undefined)
37
+ return false;
38
+ if (!('name' in value) || value['name'] === undefined)
39
+ return false;
40
+ if (!('status' in value) || value['status'] === undefined)
41
+ return false;
42
+ if (!('replicas' in value) || value['replicas'] === undefined)
43
+ return false;
44
+ if ((!('runsQueued' in value) && !('runs_queued' in value)) || (value['runsQueued'] === undefined && value['runs_queued'] === undefined))
45
+ return false;
46
+ if ((!('runs24h' in value) && !('runs_24h' in value)) || (value['runs24h'] === undefined && value['runs_24h'] === undefined))
47
+ return false;
48
+ if ((!('runCost24hUsd' in value) && !('run_cost_24h_usd' in value)) || (value['runCost24hUsd'] === undefined && value['run_cost_24h_usd'] === undefined))
49
+ return false;
50
+ if ((!('machineCost24hUsd' in value) && !('machine_cost_24h_usd' in value)) || (value['machineCost24hUsd'] === undefined && value['machine_cost_24h_usd'] === undefined))
51
+ return false;
52
+ if ((!('createdAt' in value) && !('created_at' in value)) || (value['createdAt'] === undefined && value['created_at'] === undefined))
53
+ return false;
54
+ return true;
55
+ }
56
+ function FunctionFromJSON(json) {
57
+ return FunctionFromJSONTyped(json, false);
58
+ }
59
+ function FunctionFromJSONTyped(json, ignoreDiscriminator) {
60
+ if (json == null) {
61
+ return json;
62
+ }
63
+ return {
64
+ 'id': json['id'],
65
+ 'name': json['name'],
66
+ 'status': json['status'],
67
+ 'currentVersionId': json['current_version_id'] === undefined ? undefined : json['current_version_id'] === null ? null : json['current_version_id'],
68
+ 'gpu': json['gpu'] === undefined ? undefined : json['gpu'] === null ? null : json['gpu'],
69
+ 'gpuCount': json['gpu_count'] === undefined ? undefined : json['gpu_count'] === null ? null : json['gpu_count'],
70
+ 'minVramGb': json['min_vram_gb'] === undefined ? undefined : json['min_vram_gb'] === null ? null : json['min_vram_gb'],
71
+ 'regions': json['regions'] == null ? undefined : json['regions'],
72
+ 'maxPricePerHour': json['max_price_per_hour'] === undefined ? undefined : json['max_price_per_hour'] === null ? null : json['max_price_per_hour'],
73
+ 'pythonVersion': json['python_version'] === undefined ? undefined : json['python_version'] === null ? null : json['python_version'],
74
+ 'pip': json['pip'] == null ? undefined : json['pip'],
75
+ 'timeout': json['timeout'] === undefined ? undefined : json['timeout'] === null ? null : json['timeout'],
76
+ 'idleTimeout': json['idle_timeout'] === undefined ? undefined : json['idle_timeout'] === null ? null : json['idle_timeout'],
77
+ 'maxConcurrency': json['max_concurrency'] === undefined ? undefined : json['max_concurrency'] === null ? null : json['max_concurrency'],
78
+ 'replicas': (0, FunctionReplicaCounts_1.FunctionReplicaCountsFromJSON)(json['replicas']),
79
+ 'runsQueued': json['runs_queued'],
80
+ 'runs24h': json['runs_24h'],
81
+ 'runCost24hUsd': json['run_cost_24h_usd'],
82
+ 'machineCost24hUsd': json['machine_cost_24h_usd'],
83
+ 'lastRunAt': json['last_run_at'] === undefined ? undefined : json['last_run_at'] === null ? null : (new Date(json['last_run_at'])),
84
+ 'createdAt': (new Date(json['created_at'])),
85
+ };
86
+ }
87
+ function FunctionToJSON(json) {
88
+ return FunctionToJSONTyped(json, false);
89
+ }
90
+ function FunctionToJSONTyped(value, ignoreDiscriminator = false) {
91
+ if (value == null) {
92
+ return value;
93
+ }
94
+ return {
95
+ 'id': value['id'],
96
+ 'name': value['name'],
97
+ 'status': value['status'],
98
+ 'current_version_id': value['currentVersionId'],
99
+ 'gpu': value['gpu'],
100
+ 'gpu_count': value['gpuCount'],
101
+ 'min_vram_gb': value['minVramGb'],
102
+ 'regions': value['regions'],
103
+ 'max_price_per_hour': value['maxPricePerHour'],
104
+ 'python_version': value['pythonVersion'],
105
+ 'pip': value['pip'],
106
+ 'timeout': value['timeout'],
107
+ 'idle_timeout': value['idleTimeout'],
108
+ 'max_concurrency': value['maxConcurrency'],
109
+ 'replicas': (0, FunctionReplicaCounts_1.FunctionReplicaCountsToJSON)(value['replicas']),
110
+ 'runs_queued': value['runsQueued'],
111
+ 'runs_24h': value['runs24h'],
112
+ 'run_cost_24h_usd': value['runCost24hUsd'],
113
+ 'machine_cost_24h_usd': value['machineCost24hUsd'],
114
+ 'last_run_at': value['lastRunAt'] == null ? value['lastRunAt'] : value['lastRunAt'].toISOString(),
115
+ 'created_at': value['createdAt'].toISOString(),
116
+ };
117
+ }
@@ -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 { Function } from './Function';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface FunctionList
17
+ */
18
+ export interface FunctionList {
19
+ /**
20
+ *
21
+ * @type {Array<Function>}
22
+ * @memberof FunctionList
23
+ */
24
+ data: Array<Function>;
25
+ }
26
+ /**
27
+ * Check if a given object implements the FunctionList interface.
28
+ */
29
+ export declare function instanceOfFunctionList(value: object): value is FunctionList;
30
+ export declare function FunctionListFromJSON(json: any): FunctionList;
31
+ export declare function FunctionListFromJSONTyped(json: any, ignoreDiscriminator: boolean): FunctionList;
32
+ export declare function FunctionListToJSON(json: any): FunctionList;
33
+ export declare function FunctionListToJSONTyped(value?: FunctionList | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,51 @@
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.instanceOfFunctionList = instanceOfFunctionList;
17
+ exports.FunctionListFromJSON = FunctionListFromJSON;
18
+ exports.FunctionListFromJSONTyped = FunctionListFromJSONTyped;
19
+ exports.FunctionListToJSON = FunctionListToJSON;
20
+ exports.FunctionListToJSONTyped = FunctionListToJSONTyped;
21
+ const Function_1 = require("./Function");
22
+ /**
23
+ * Check if a given object implements the FunctionList interface.
24
+ */
25
+ function instanceOfFunctionList(value) {
26
+ if (!('data' in value) || value['data'] === undefined)
27
+ return false;
28
+ return true;
29
+ }
30
+ function FunctionListFromJSON(json) {
31
+ return FunctionListFromJSONTyped(json, false);
32
+ }
33
+ function FunctionListFromJSONTyped(json, ignoreDiscriminator) {
34
+ if (json == null) {
35
+ return json;
36
+ }
37
+ return {
38
+ 'data': (json['data'].map(Function_1.FunctionFromJSON)),
39
+ };
40
+ }
41
+ function FunctionListToJSON(json) {
42
+ return FunctionListToJSONTyped(json, false);
43
+ }
44
+ function FunctionListToJSONTyped(value, ignoreDiscriminator = false) {
45
+ if (value == null) {
46
+ return value;
47
+ }
48
+ return {
49
+ 'data': (value['data'].map(Function_1.FunctionToJSON)),
50
+ };
51
+ }
@@ -0,0 +1,44 @@
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
+ * How many machines a function has in each state.
14
+ * @export
15
+ * @interface FunctionReplicaCounts
16
+ */
17
+ export interface FunctionReplicaCounts {
18
+ /**
19
+ * Machines being started.
20
+ * @type {number}
21
+ * @memberof FunctionReplicaCounts
22
+ */
23
+ starting: number;
24
+ /**
25
+ * Machines ready and waiting for a call.
26
+ * @type {number}
27
+ * @memberof FunctionReplicaCounts
28
+ */
29
+ warm: number;
30
+ /**
31
+ * Machines executing a call.
32
+ * @type {number}
33
+ * @memberof FunctionReplicaCounts
34
+ */
35
+ running: number;
36
+ }
37
+ /**
38
+ * Check if a given object implements the FunctionReplicaCounts interface.
39
+ */
40
+ export declare function instanceOfFunctionReplicaCounts(value: object): value is FunctionReplicaCounts;
41
+ export declare function FunctionReplicaCountsFromJSON(json: any): FunctionReplicaCounts;
42
+ export declare function FunctionReplicaCountsFromJSONTyped(json: any, ignoreDiscriminator: boolean): FunctionReplicaCounts;
43
+ export declare function FunctionReplicaCountsToJSON(json: any): FunctionReplicaCounts;
44
+ export declare function FunctionReplicaCountsToJSONTyped(value?: FunctionReplicaCounts | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,58 @@
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.instanceOfFunctionReplicaCounts = instanceOfFunctionReplicaCounts;
17
+ exports.FunctionReplicaCountsFromJSON = FunctionReplicaCountsFromJSON;
18
+ exports.FunctionReplicaCountsFromJSONTyped = FunctionReplicaCountsFromJSONTyped;
19
+ exports.FunctionReplicaCountsToJSON = FunctionReplicaCountsToJSON;
20
+ exports.FunctionReplicaCountsToJSONTyped = FunctionReplicaCountsToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the FunctionReplicaCounts interface.
23
+ */
24
+ function instanceOfFunctionReplicaCounts(value) {
25
+ if (!('starting' in value) || value['starting'] === undefined)
26
+ return false;
27
+ if (!('warm' in value) || value['warm'] === undefined)
28
+ return false;
29
+ if (!('running' in value) || value['running'] === undefined)
30
+ return false;
31
+ return true;
32
+ }
33
+ function FunctionReplicaCountsFromJSON(json) {
34
+ return FunctionReplicaCountsFromJSONTyped(json, false);
35
+ }
36
+ function FunctionReplicaCountsFromJSONTyped(json, ignoreDiscriminator) {
37
+ if (json == null) {
38
+ return json;
39
+ }
40
+ return {
41
+ 'starting': json['starting'],
42
+ 'warm': json['warm'],
43
+ 'running': json['running'],
44
+ };
45
+ }
46
+ function FunctionReplicaCountsToJSON(json) {
47
+ return FunctionReplicaCountsToJSONTyped(json, false);
48
+ }
49
+ function FunctionReplicaCountsToJSONTyped(value, ignoreDiscriminator = false) {
50
+ if (value == null) {
51
+ return value;
52
+ }
53
+ return {
54
+ 'starting': value['starting'],
55
+ 'warm': value['warm'],
56
+ 'running': value['running'],
57
+ };
58
+ }