@gpuai/sdk 0.4.0 → 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 (47) hide show
  1. package/.openapi-generator/FILES +8 -0
  2. package/README.md +7 -2
  3. package/dist/apis/InstancesApi.d.ts +18 -0
  4. package/dist/apis/InstancesApi.js +49 -0
  5. package/dist/esm/apis/InstancesApi.d.ts +18 -0
  6. package/dist/esm/apis/InstancesApi.js +49 -0
  7. package/dist/esm/models/GpuSuggestion.d.ts +82 -0
  8. package/dist/esm/models/GpuSuggestion.js +77 -0
  9. package/dist/esm/models/GpuSuggestionCheaper.d.ts +62 -0
  10. package/dist/esm/models/GpuSuggestionCheaper.js +63 -0
  11. package/dist/esm/models/GpuSuggestionGpu.d.ts +50 -0
  12. package/dist/esm/models/GpuSuggestionGpu.js +55 -0
  13. package/dist/esm/models/Instance.d.ts +7 -0
  14. package/dist/esm/models/Instance.js +3 -0
  15. package/dist/esm/models/InstanceGpuMemory.d.ts +51 -0
  16. package/dist/esm/models/InstanceGpuMemory.js +55 -0
  17. package/dist/esm/models/index.d.ts +4 -0
  18. package/dist/esm/models/index.js +4 -0
  19. package/dist/esm/runtime.js +1 -1
  20. package/dist/models/GpuSuggestion.d.ts +82 -0
  21. package/dist/models/GpuSuggestion.js +85 -0
  22. package/dist/models/GpuSuggestionCheaper.d.ts +62 -0
  23. package/dist/models/GpuSuggestionCheaper.js +70 -0
  24. package/dist/models/GpuSuggestionGpu.d.ts +50 -0
  25. package/dist/models/GpuSuggestionGpu.js +62 -0
  26. package/dist/models/Instance.d.ts +7 -0
  27. package/dist/models/Instance.js +3 -0
  28. package/dist/models/InstanceGpuMemory.d.ts +51 -0
  29. package/dist/models/InstanceGpuMemory.js +62 -0
  30. package/dist/models/index.d.ts +4 -0
  31. package/dist/models/index.js +4 -0
  32. package/dist/runtime.js +1 -1
  33. package/docs/GpuSuggestion.md +47 -0
  34. package/docs/GpuSuggestionCheaper.md +45 -0
  35. package/docs/GpuSuggestionGpu.md +41 -0
  36. package/docs/Instance.md +2 -0
  37. package/docs/InstanceGpuMemory.md +41 -0
  38. package/docs/InstancesApi.md +75 -0
  39. package/package.json +1 -1
  40. package/src/apis/InstancesApi.ts +64 -0
  41. package/src/models/GpuSuggestion.ts +150 -0
  42. package/src/models/GpuSuggestionCheaper.ts +111 -0
  43. package/src/models/GpuSuggestionGpu.ts +93 -0
  44. package/src/models/Instance.ts +15 -0
  45. package/src/models/InstanceGpuMemory.ts +94 -0
  46. package/src/models/index.ts +4 -0
  47. package/src/runtime.ts +1 -1
@@ -0,0 +1,150 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * GPU.ai Public Developer API
5
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@gpu.ai
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ import type { GpuSuggestionCheaper } from './GpuSuggestionCheaper';
17
+ import {
18
+ GpuSuggestionCheaperFromJSON,
19
+ GpuSuggestionCheaperFromJSONTyped,
20
+ GpuSuggestionCheaperToJSON,
21
+ GpuSuggestionCheaperToJSONTyped,
22
+ } from './GpuSuggestionCheaper';
23
+ import type { GpuSuggestionGpu } from './GpuSuggestionGpu';
24
+ import {
25
+ GpuSuggestionGpuFromJSON,
26
+ GpuSuggestionGpuFromJSONTyped,
27
+ GpuSuggestionGpuToJSON,
28
+ GpuSuggestionGpuToJSONTyped,
29
+ } from './GpuSuggestionGpu';
30
+
31
+ /**
32
+ * Whether a lower-priced GPU model would have fit an instance's observed peak GPU memory. It names GPU models and prices only.
33
+ *
34
+ * @export
35
+ * @interface GpuSuggestion
36
+ */
37
+ export interface GpuSuggestion {
38
+ /**
39
+ * `suggestion` when a cheaper model fits and the saving is at least 10% and $0.05 per hour. `insufficient_data` until the instance has at least 30 samples over at least an hour. `no_cheaper_fit` otherwise.
40
+ *
41
+ * @type {GpuSuggestionStatusEnum}
42
+ * @memberof GpuSuggestion
43
+ */
44
+ status: GpuSuggestionStatusEnum;
45
+ /**
46
+ * Highest GPU memory seen, in MiB. Null with no telemetry.
47
+ * @type {number}
48
+ * @memberof GpuSuggestion
49
+ */
50
+ peakUsedMb: number | null;
51
+ /**
52
+ * The peak plus headroom (25% and 1024 MiB), in MiB: the memory a suggested model must have. Null until there is enough telemetry.
53
+ *
54
+ * @type {number}
55
+ * @memberof GpuSuggestion
56
+ */
57
+ requiredMb: number | null;
58
+ /**
59
+ *
60
+ * @type {number}
61
+ * @memberof GpuSuggestion
62
+ */
63
+ samples: number;
64
+ /**
65
+ * Minutes between the first and the latest telemetry sample.
66
+ * @type {number}
67
+ * @memberof GpuSuggestion
68
+ */
69
+ observedMinutes: number;
70
+ /**
71
+ *
72
+ * @type {GpuSuggestionGpu}
73
+ * @memberof GpuSuggestion
74
+ */
75
+ current: GpuSuggestionGpu;
76
+ /**
77
+ * Set only when status is `suggestion`.
78
+ * @type {GpuSuggestionCheaper}
79
+ * @memberof GpuSuggestion
80
+ */
81
+ suggestion: GpuSuggestionCheaper | null;
82
+ }
83
+
84
+
85
+ /**
86
+ * @export
87
+ */
88
+ export const GpuSuggestionStatusEnum = {
89
+ Suggestion: 'suggestion',
90
+ InsufficientData: 'insufficient_data',
91
+ NoCheaperFit: 'no_cheaper_fit'
92
+ } as const;
93
+ export type GpuSuggestionStatusEnum = typeof GpuSuggestionStatusEnum[keyof typeof GpuSuggestionStatusEnum];
94
+
95
+
96
+ /**
97
+ * Check if a given object implements the GpuSuggestion interface.
98
+ */
99
+ export function instanceOfGpuSuggestion(value: object): value is GpuSuggestion {
100
+ if (!('status' in value) || value['status'] === undefined) return false;
101
+ if ((!('peakUsedMb' in (value as Record<string, any>)) && !('peak_used_mb' in (value as Record<string, any>))) || ((value as Record<string, any>)['peakUsedMb'] === undefined && (value as Record<string, any>)['peak_used_mb'] === undefined)) return false;
102
+ if ((!('requiredMb' in (value as Record<string, any>)) && !('required_mb' in (value as Record<string, any>))) || ((value as Record<string, any>)['requiredMb'] === undefined && (value as Record<string, any>)['required_mb'] === undefined)) return false;
103
+ if (!('samples' in value) || value['samples'] === undefined) return false;
104
+ if ((!('observedMinutes' in (value as Record<string, any>)) && !('observed_minutes' in (value as Record<string, any>))) || ((value as Record<string, any>)['observedMinutes'] === undefined && (value as Record<string, any>)['observed_minutes'] === undefined)) return false;
105
+ if (!('current' in value) || value['current'] === undefined) return false;
106
+ if (!('suggestion' in value) || value['suggestion'] === undefined) return false;
107
+ return true;
108
+ }
109
+
110
+ export function GpuSuggestionFromJSON(json: any): GpuSuggestion {
111
+ return GpuSuggestionFromJSONTyped(json, false);
112
+ }
113
+
114
+ export function GpuSuggestionFromJSONTyped(json: any, ignoreDiscriminator: boolean): GpuSuggestion {
115
+ if (json == null) {
116
+ return json;
117
+ }
118
+ return {
119
+
120
+ 'status': json['status'],
121
+ 'peakUsedMb': json['peak_used_mb'],
122
+ 'requiredMb': json['required_mb'],
123
+ 'samples': json['samples'],
124
+ 'observedMinutes': json['observed_minutes'],
125
+ 'current': GpuSuggestionGpuFromJSON(json['current']),
126
+ 'suggestion': GpuSuggestionCheaperFromJSON(json['suggestion']),
127
+ };
128
+ }
129
+
130
+ export function GpuSuggestionToJSON(json: any): GpuSuggestion {
131
+ return GpuSuggestionToJSONTyped(json, false);
132
+ }
133
+
134
+ export function GpuSuggestionToJSONTyped(value?: GpuSuggestion | null, ignoreDiscriminator: boolean = false): any {
135
+ if (value == null) {
136
+ return value;
137
+ }
138
+
139
+ return {
140
+
141
+ 'status': value['status'],
142
+ 'peak_used_mb': value['peakUsedMb'],
143
+ 'required_mb': value['requiredMb'],
144
+ 'samples': value['samples'],
145
+ 'observed_minutes': value['observedMinutes'],
146
+ 'current': GpuSuggestionGpuToJSON(value['current']),
147
+ 'suggestion': GpuSuggestionCheaperToJSON(value['suggestion']),
148
+ };
149
+ }
150
+
@@ -0,0 +1,111 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * GPU.ai Public Developer API
5
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@gpu.ai
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ * The suggested GPU model and what it would save.
18
+ * @export
19
+ * @interface GpuSuggestionCheaper
20
+ */
21
+ export interface GpuSuggestionCheaper {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof GpuSuggestionCheaper
26
+ */
27
+ gpuType: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof GpuSuggestionCheaper
32
+ */
33
+ gpuName: string;
34
+ /**
35
+ *
36
+ * @type {number}
37
+ * @memberof GpuSuggestionCheaper
38
+ */
39
+ vramGb: number;
40
+ /**
41
+ * The cheapest current listing for this model, per hour.
42
+ * @type {number}
43
+ * @memberof GpuSuggestionCheaper
44
+ */
45
+ pricePerHour: number;
46
+ /**
47
+ * The instance's hourly price minus this model's.
48
+ * @type {number}
49
+ * @memberof GpuSuggestionCheaper
50
+ */
51
+ savingPerHour: number;
52
+ /**
53
+ * The saving as a percentage of the instance's hourly price.
54
+ * @type {number}
55
+ * @memberof GpuSuggestionCheaper
56
+ */
57
+ savingPct: number;
58
+ }
59
+
60
+ /**
61
+ * Check if a given object implements the GpuSuggestionCheaper interface.
62
+ */
63
+ export function instanceOfGpuSuggestionCheaper(value: object): value is GpuSuggestionCheaper {
64
+ if ((!('gpuType' in (value as Record<string, any>)) && !('gpu_type' in (value as Record<string, any>))) || ((value as Record<string, any>)['gpuType'] === undefined && (value as Record<string, any>)['gpu_type'] === undefined)) return false;
65
+ if ((!('gpuName' in (value as Record<string, any>)) && !('gpu_name' in (value as Record<string, any>))) || ((value as Record<string, any>)['gpuName'] === undefined && (value as Record<string, any>)['gpu_name'] === undefined)) return false;
66
+ if ((!('vramGb' in (value as Record<string, any>)) && !('vram_gb' in (value as Record<string, any>))) || ((value as Record<string, any>)['vramGb'] === undefined && (value as Record<string, any>)['vram_gb'] === undefined)) return false;
67
+ if ((!('pricePerHour' in (value as Record<string, any>)) && !('price_per_hour' in (value as Record<string, any>))) || ((value as Record<string, any>)['pricePerHour'] === undefined && (value as Record<string, any>)['price_per_hour'] === undefined)) return false;
68
+ if ((!('savingPerHour' in (value as Record<string, any>)) && !('saving_per_hour' in (value as Record<string, any>))) || ((value as Record<string, any>)['savingPerHour'] === undefined && (value as Record<string, any>)['saving_per_hour'] === undefined)) return false;
69
+ if ((!('savingPct' in (value as Record<string, any>)) && !('saving_pct' in (value as Record<string, any>))) || ((value as Record<string, any>)['savingPct'] === undefined && (value as Record<string, any>)['saving_pct'] === undefined)) return false;
70
+ return true;
71
+ }
72
+
73
+ export function GpuSuggestionCheaperFromJSON(json: any): GpuSuggestionCheaper {
74
+ return GpuSuggestionCheaperFromJSONTyped(json, false);
75
+ }
76
+
77
+ export function GpuSuggestionCheaperFromJSONTyped(json: any, ignoreDiscriminator: boolean): GpuSuggestionCheaper {
78
+ if (json == null) {
79
+ return json;
80
+ }
81
+ return {
82
+
83
+ 'gpuType': json['gpu_type'],
84
+ 'gpuName': json['gpu_name'],
85
+ 'vramGb': json['vram_gb'],
86
+ 'pricePerHour': json['price_per_hour'],
87
+ 'savingPerHour': json['saving_per_hour'],
88
+ 'savingPct': json['saving_pct'],
89
+ };
90
+ }
91
+
92
+ export function GpuSuggestionCheaperToJSON(json: any): GpuSuggestionCheaper {
93
+ return GpuSuggestionCheaperToJSONTyped(json, false);
94
+ }
95
+
96
+ export function GpuSuggestionCheaperToJSONTyped(value?: GpuSuggestionCheaper | null, ignoreDiscriminator: boolean = false): any {
97
+ if (value == null) {
98
+ return value;
99
+ }
100
+
101
+ return {
102
+
103
+ 'gpu_type': value['gpuType'],
104
+ 'gpu_name': value['gpuName'],
105
+ 'vram_gb': value['vramGb'],
106
+ 'price_per_hour': value['pricePerHour'],
107
+ 'saving_per_hour': value['savingPerHour'],
108
+ 'saving_pct': value['savingPct'],
109
+ };
110
+ }
111
+
@@ -0,0 +1,93 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * GPU.ai Public Developer API
5
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@gpu.ai
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ * A GPU model at an hourly price.
18
+ * @export
19
+ * @interface GpuSuggestionGpu
20
+ */
21
+ export interface GpuSuggestionGpu {
22
+ /**
23
+ * The GPU model id, as in GET /v1/gpu-types.
24
+ * @type {string}
25
+ * @memberof GpuSuggestionGpu
26
+ */
27
+ gpuType: string;
28
+ /**
29
+ * The GPU model's display name.
30
+ * @type {string}
31
+ * @memberof GpuSuggestionGpu
32
+ */
33
+ gpuName: string;
34
+ /**
35
+ * Memory per GPU, in GB.
36
+ * @type {number}
37
+ * @memberof GpuSuggestionGpu
38
+ */
39
+ vramGb: number;
40
+ /**
41
+ * Hourly price for the same number of GPUs as the instance.
42
+ * @type {number}
43
+ * @memberof GpuSuggestionGpu
44
+ */
45
+ pricePerHour: number;
46
+ }
47
+
48
+ /**
49
+ * Check if a given object implements the GpuSuggestionGpu interface.
50
+ */
51
+ export function instanceOfGpuSuggestionGpu(value: object): value is GpuSuggestionGpu {
52
+ if ((!('gpuType' in (value as Record<string, any>)) && !('gpu_type' in (value as Record<string, any>))) || ((value as Record<string, any>)['gpuType'] === undefined && (value as Record<string, any>)['gpu_type'] === undefined)) return false;
53
+ if ((!('gpuName' in (value as Record<string, any>)) && !('gpu_name' in (value as Record<string, any>))) || ((value as Record<string, any>)['gpuName'] === undefined && (value as Record<string, any>)['gpu_name'] === undefined)) return false;
54
+ if ((!('vramGb' in (value as Record<string, any>)) && !('vram_gb' in (value as Record<string, any>))) || ((value as Record<string, any>)['vramGb'] === undefined && (value as Record<string, any>)['vram_gb'] === undefined)) return false;
55
+ if ((!('pricePerHour' in (value as Record<string, any>)) && !('price_per_hour' in (value as Record<string, any>))) || ((value as Record<string, any>)['pricePerHour'] === undefined && (value as Record<string, any>)['price_per_hour'] === undefined)) return false;
56
+ return true;
57
+ }
58
+
59
+ export function GpuSuggestionGpuFromJSON(json: any): GpuSuggestionGpu {
60
+ return GpuSuggestionGpuFromJSONTyped(json, false);
61
+ }
62
+
63
+ export function GpuSuggestionGpuFromJSONTyped(json: any, ignoreDiscriminator: boolean): GpuSuggestionGpu {
64
+ if (json == null) {
65
+ return json;
66
+ }
67
+ return {
68
+
69
+ 'gpuType': json['gpu_type'],
70
+ 'gpuName': json['gpu_name'],
71
+ 'vramGb': json['vram_gb'],
72
+ 'pricePerHour': json['price_per_hour'],
73
+ };
74
+ }
75
+
76
+ export function GpuSuggestionGpuToJSON(json: any): GpuSuggestionGpu {
77
+ return GpuSuggestionGpuToJSONTyped(json, false);
78
+ }
79
+
80
+ export function GpuSuggestionGpuToJSONTyped(value?: GpuSuggestionGpu | null, ignoreDiscriminator: boolean = false): any {
81
+ if (value == null) {
82
+ return value;
83
+ }
84
+
85
+ return {
86
+
87
+ 'gpu_type': value['gpuType'],
88
+ 'gpu_name': value['gpuName'],
89
+ 'vram_gb': value['vramGb'],
90
+ 'price_per_hour': value['pricePerHour'],
91
+ };
92
+ }
93
+
@@ -20,6 +20,13 @@ import {
20
20
  InstanceConnectionToJSON,
21
21
  InstanceConnectionToJSONTyped,
22
22
  } from './InstanceConnection';
23
+ import type { InstanceGpuMemory } from './InstanceGpuMemory';
24
+ import {
25
+ InstanceGpuMemoryFromJSON,
26
+ InstanceGpuMemoryFromJSONTyped,
27
+ InstanceGpuMemoryToJSON,
28
+ InstanceGpuMemoryToJSONTyped,
29
+ } from './InstanceGpuMemory';
23
30
 
24
31
  /**
25
32
  *
@@ -75,6 +82,12 @@ export interface Instance {
75
82
  * @memberof Instance
76
83
  */
77
84
  pricePerHour: number;
85
+ /**
86
+ *
87
+ * @type {InstanceGpuMemory}
88
+ * @memberof Instance
89
+ */
90
+ gpuMemory?: InstanceGpuMemory;
78
91
  /**
79
92
  *
80
93
  * @type {InstanceConnection}
@@ -202,6 +215,7 @@ export function InstanceFromJSONTyped(json: any, ignoreDiscriminator: boolean):
202
215
  'region': json['region'],
203
216
  'tier': json['tier'],
204
217
  'pricePerHour': json['price_per_hour'],
218
+ 'gpuMemory': json['gpu_memory'] == null ? undefined : InstanceGpuMemoryFromJSON(json['gpu_memory']),
205
219
  'connection': json['connection'] == null ? undefined : InstanceConnectionFromJSON(json['connection']),
206
220
  'diskGb': json['disk_gb'] == null ? undefined : json['disk_gb'],
207
221
  'image': json['image'] == null ? undefined : json['image'],
@@ -235,6 +249,7 @@ export function InstanceToJSONTyped(value?: Instance | null, ignoreDiscriminator
235
249
  'region': value['region'],
236
250
  'tier': value['tier'],
237
251
  'price_per_hour': value['pricePerHour'],
252
+ 'gpu_memory': InstanceGpuMemoryToJSON(value['gpuMemory']),
238
253
  'connection': InstanceConnectionToJSON(value['connection']),
239
254
  'disk_gb': value['diskGb'],
240
255
  'image': value['image'],
@@ -0,0 +1,94 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * GPU.ai Public Developer API
5
+ * Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@gpu.ai
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ * The highest GPU memory use seen on an instance since launch, from the telemetry every instance reports about every two minutes. On an instance with several GPUs it is the busiest GPU. Absent on an instance until its first sample arrives.
18
+ *
19
+ * @export
20
+ * @interface InstanceGpuMemory
21
+ */
22
+ export interface InstanceGpuMemory {
23
+ /**
24
+ * Highest memory in use on the GPU, in MiB.
25
+ * @type {number}
26
+ * @memberof InstanceGpuMemory
27
+ */
28
+ peakUsedMb: number;
29
+ /**
30
+ * The GPU's total memory, in MiB.
31
+ * @type {number}
32
+ * @memberof InstanceGpuMemory
33
+ */
34
+ totalMb: number;
35
+ /**
36
+ * How many telemetry samples the peak is taken from.
37
+ * @type {number}
38
+ * @memberof InstanceGpuMemory
39
+ */
40
+ samples: number;
41
+ /**
42
+ *
43
+ * @type {Date}
44
+ * @memberof InstanceGpuMemory
45
+ */
46
+ lastSampleAt: Date;
47
+ }
48
+
49
+ /**
50
+ * Check if a given object implements the InstanceGpuMemory interface.
51
+ */
52
+ export function instanceOfInstanceGpuMemory(value: object): value is InstanceGpuMemory {
53
+ if ((!('peakUsedMb' in (value as Record<string, any>)) && !('peak_used_mb' in (value as Record<string, any>))) || ((value as Record<string, any>)['peakUsedMb'] === undefined && (value as Record<string, any>)['peak_used_mb'] === undefined)) return false;
54
+ if ((!('totalMb' in (value as Record<string, any>)) && !('total_mb' in (value as Record<string, any>))) || ((value as Record<string, any>)['totalMb'] === undefined && (value as Record<string, any>)['total_mb'] === undefined)) return false;
55
+ if (!('samples' in value) || value['samples'] === undefined) return false;
56
+ if ((!('lastSampleAt' in (value as Record<string, any>)) && !('last_sample_at' in (value as Record<string, any>))) || ((value as Record<string, any>)['lastSampleAt'] === undefined && (value as Record<string, any>)['last_sample_at'] === undefined)) return false;
57
+ return true;
58
+ }
59
+
60
+ export function InstanceGpuMemoryFromJSON(json: any): InstanceGpuMemory {
61
+ return InstanceGpuMemoryFromJSONTyped(json, false);
62
+ }
63
+
64
+ export function InstanceGpuMemoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): InstanceGpuMemory {
65
+ if (json == null) {
66
+ return json;
67
+ }
68
+ return {
69
+
70
+ 'peakUsedMb': json['peak_used_mb'],
71
+ 'totalMb': json['total_mb'],
72
+ 'samples': json['samples'],
73
+ 'lastSampleAt': (new Date(json['last_sample_at'])),
74
+ };
75
+ }
76
+
77
+ export function InstanceGpuMemoryToJSON(json: any): InstanceGpuMemory {
78
+ return InstanceGpuMemoryToJSONTyped(json, false);
79
+ }
80
+
81
+ export function InstanceGpuMemoryToJSONTyped(value?: InstanceGpuMemory | null, ignoreDiscriminator: boolean = false): any {
82
+ if (value == null) {
83
+ return value;
84
+ }
85
+
86
+ return {
87
+
88
+ 'peak_used_mb': value['peakUsedMb'],
89
+ 'total_mb': value['totalMb'],
90
+ 'samples': value['samples'],
91
+ 'last_sample_at': value['lastSampleAt'].toISOString(),
92
+ };
93
+ }
94
+
@@ -55,6 +55,9 @@ export * from './FunctionVersion';
55
55
  export * from './GPUType';
56
56
  export * from './GPUTypePage';
57
57
  export * from './GetHealth200Response';
58
+ export * from './GpuSuggestion';
59
+ export * from './GpuSuggestionCheaper';
60
+ export * from './GpuSuggestionGpu';
58
61
  export * from './ImagesGenerationsRequest';
59
62
  export * from './ImagesResponse';
60
63
  export * from './ImagesResponseDataInner';
@@ -62,6 +65,7 @@ export * from './ImagesResponseUsage';
62
65
  export * from './IncludeItem';
63
66
  export * from './Instance';
64
67
  export * from './InstanceConnection';
68
+ export * from './InstanceGpuMemory';
65
69
  export * from './InstancePage';
66
70
  export * from './Invoice';
67
71
  export * from './InvoiceList';
package/src/runtime.ts CHANGED
@@ -75,7 +75,7 @@ export class Configuration {
75
75
  }
76
76
 
77
77
  get headers(): HTTPHeaders | undefined {
78
- return { 'User-Agent': 'gpuai-sdk-ts/0.4.0', ...this.configuration.headers };
78
+ return { 'User-Agent': 'gpuai-sdk-ts/0.4.1', ...this.configuration.headers };
79
79
  }
80
80
 
81
81
  get credentials(): RequestCredentials | undefined {