@gpuai/sdk 0.5.4 → 0.5.5

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