@gpuai/sdk 0.5.1 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +4 -0
- package/README.md +6 -2
- package/dist/apis/InferenceApi.d.ts +60 -0
- package/dist/apis/InferenceApi.js +126 -1
- package/dist/esm/apis/InferenceApi.d.ts +60 -0
- package/dist/esm/apis/InferenceApi.js +125 -0
- package/dist/esm/models/DataRetention.d.ts +51 -0
- package/dist/esm/models/DataRetention.js +57 -0
- package/dist/esm/models/Model.d.ts +6 -0
- package/dist/esm/models/Model.js +2 -0
- package/dist/esm/models/UpdateDataRetentionRequest.d.ts +32 -0
- package/dist/esm/models/UpdateDataRetentionRequest.js +43 -0
- package/dist/esm/models/index.d.ts +2 -0
- package/dist/esm/models/index.js +2 -0
- package/dist/esm/runtime.js +1 -1
- package/dist/models/DataRetention.d.ts +51 -0
- package/dist/models/DataRetention.js +65 -0
- package/dist/models/Model.d.ts +6 -0
- package/dist/models/Model.js +2 -0
- package/dist/models/UpdateDataRetentionRequest.d.ts +32 -0
- package/dist/models/UpdateDataRetentionRequest.js +50 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/dist/runtime.js +1 -1
- package/docs/DataRetention.md +38 -0
- package/docs/FineTuningApi.md +2 -2
- package/docs/InferenceApi.md +163 -12
- package/docs/Model.md +2 -0
- package/docs/UpdateDataRetentionRequest.md +34 -0
- package/package.json +1 -1
- package/src/apis/InferenceApi.ts +162 -0
- package/src/models/DataRetention.ts +95 -0
- package/src/models/Model.ts +8 -0
- package/src/models/UpdateDataRetentionRequest.ts +66 -0
- package/src/models/index.ts +2 -0
- package/src/runtime.ts +1 -1
|
@@ -0,0 +1,95 @@
|
|
|
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
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface DataRetention
|
|
20
|
+
*/
|
|
21
|
+
export interface DataRetention {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {DataRetentionObjectEnum}
|
|
25
|
+
* @memberof DataRetention
|
|
26
|
+
*/
|
|
27
|
+
object: DataRetentionObjectEnum;
|
|
28
|
+
/**
|
|
29
|
+
* True when the org's inference requests route only to zero-data-retention model hosts.
|
|
30
|
+
* @type {boolean}
|
|
31
|
+
* @memberof DataRetention
|
|
32
|
+
*/
|
|
33
|
+
zeroDataRetention: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* When the setting last changed; absent if it never has.
|
|
36
|
+
* @type {Date}
|
|
37
|
+
* @memberof DataRetention
|
|
38
|
+
*/
|
|
39
|
+
updatedAt?: Date;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @export
|
|
45
|
+
*/
|
|
46
|
+
export const DataRetentionObjectEnum = {
|
|
47
|
+
OrganizationDataRetention: 'organization.data_retention'
|
|
48
|
+
} as const;
|
|
49
|
+
export type DataRetentionObjectEnum = typeof DataRetentionObjectEnum[keyof typeof DataRetentionObjectEnum];
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Check if a given object implements the DataRetention interface.
|
|
54
|
+
*/
|
|
55
|
+
export function instanceOfDataRetention(value: object): value is DataRetention {
|
|
56
|
+
if (!('object' in value) || value['object'] === undefined) return false;
|
|
57
|
+
if (value['object'] !== 'organization.data_retention') return false;
|
|
58
|
+
|
|
59
|
+
if ((!('zeroDataRetention' in (value as Record<string, any>)) && !('zero_data_retention' in (value as Record<string, any>))) || ((value as Record<string, any>)['zeroDataRetention'] === undefined && (value as Record<string, any>)['zero_data_retention'] === undefined)) return false;
|
|
60
|
+
return true;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function DataRetentionFromJSON(json: any): DataRetention {
|
|
64
|
+
return DataRetentionFromJSONTyped(json, false);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function DataRetentionFromJSONTyped(json: any, ignoreDiscriminator: boolean): DataRetention {
|
|
68
|
+
if (json == null) {
|
|
69
|
+
return json;
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
|
|
73
|
+
'object': json['object'],
|
|
74
|
+
'zeroDataRetention': json['zero_data_retention'],
|
|
75
|
+
'updatedAt': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])),
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function DataRetentionToJSON(json: any): DataRetention {
|
|
80
|
+
return DataRetentionToJSONTyped(json, false);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function DataRetentionToJSONTyped(value?: DataRetention | null, ignoreDiscriminator: boolean = false): any {
|
|
84
|
+
if (value == null) {
|
|
85
|
+
return value;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return {
|
|
89
|
+
|
|
90
|
+
'object': value['object'],
|
|
91
|
+
'zero_data_retention': value['zeroDataRetention'],
|
|
92
|
+
'updated_at': value['updatedAt'] == null ? value['updatedAt'] : value['updatedAt'].toISOString(),
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
|
package/src/models/Model.ts
CHANGED
|
@@ -100,6 +100,12 @@ export interface Model {
|
|
|
100
100
|
* @memberof Model
|
|
101
101
|
*/
|
|
102
102
|
supportsStructuredOutputs?: boolean;
|
|
103
|
+
/**
|
|
104
|
+
* True when this model and tier can be served with zero data retention: at least one model host keeps no prompt or output content. Only these models are callable by an org with zero data retention on, or with the X-GPUAI-Zero-Data-Retention header. Always false for video.
|
|
105
|
+
* @type {boolean}
|
|
106
|
+
* @memberof Model
|
|
107
|
+
*/
|
|
108
|
+
zeroDataRetention?: boolean;
|
|
103
109
|
/**
|
|
104
110
|
* Typed parameter descriptors for media (image/video) models — name, type, enum/bounds/default. Playgrounds render input forms from these.
|
|
105
111
|
* @type {Array<ModelParametersInner>}
|
|
@@ -205,6 +211,7 @@ export function ModelFromJSONTyped(json: any, ignoreDiscriminator: boolean): Mod
|
|
|
205
211
|
'supportedParameters': json['supported_parameters'] == null ? undefined : json['supported_parameters'],
|
|
206
212
|
'supportsTools': json['supports_tools'] == null ? undefined : json['supports_tools'],
|
|
207
213
|
'supportsStructuredOutputs': json['supports_structured_outputs'] == null ? undefined : json['supports_structured_outputs'],
|
|
214
|
+
'zeroDataRetention': json['zero_data_retention'] == null ? undefined : json['zero_data_retention'],
|
|
208
215
|
'parameters': json['parameters'] == null ? undefined : ((json['parameters'] as Array<any>).map(ModelParametersInnerFromJSON)),
|
|
209
216
|
'pricing': ModelPricingFromJSON(json['pricing']),
|
|
210
217
|
'aliases': json['aliases'] == null ? undefined : json['aliases'],
|
|
@@ -236,6 +243,7 @@ export function ModelToJSONTyped(value?: Model | null, ignoreDiscriminator: bool
|
|
|
236
243
|
'supported_parameters': value['supportedParameters'],
|
|
237
244
|
'supports_tools': value['supportsTools'],
|
|
238
245
|
'supports_structured_outputs': value['supportsStructuredOutputs'],
|
|
246
|
+
'zero_data_retention': value['zeroDataRetention'],
|
|
239
247
|
'parameters': value['parameters'] == null ? undefined : ((value['parameters'] as Array<any>).map(ModelParametersInnerToJSON)),
|
|
240
248
|
'pricing': ModelPricingToJSON(value['pricing']),
|
|
241
249
|
'aliases': value['aliases'],
|
|
@@ -0,0 +1,66 @@
|
|
|
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
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface UpdateDataRetentionRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface UpdateDataRetentionRequest {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {boolean}
|
|
25
|
+
* @memberof UpdateDataRetentionRequest
|
|
26
|
+
*/
|
|
27
|
+
zeroDataRetention: boolean;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the UpdateDataRetentionRequest interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfUpdateDataRetentionRequest(value: object): value is UpdateDataRetentionRequest {
|
|
34
|
+
if ((!('zeroDataRetention' in (value as Record<string, any>)) && !('zero_data_retention' in (value as Record<string, any>))) || ((value as Record<string, any>)['zeroDataRetention'] === undefined && (value as Record<string, any>)['zero_data_retention'] === undefined)) return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function UpdateDataRetentionRequestFromJSON(json: any): UpdateDataRetentionRequest {
|
|
39
|
+
return UpdateDataRetentionRequestFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function UpdateDataRetentionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateDataRetentionRequest {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
|
|
48
|
+
'zeroDataRetention': json['zero_data_retention'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function UpdateDataRetentionRequestToJSON(json: any): UpdateDataRetentionRequest {
|
|
53
|
+
return UpdateDataRetentionRequestToJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function UpdateDataRetentionRequestToJSONTyped(value?: UpdateDataRetentionRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
57
|
+
if (value == null) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
|
|
63
|
+
'zero_data_retention': value['zeroDataRetention'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -37,6 +37,7 @@ export * from './CreateRegistryCredentialRequest';
|
|
|
37
37
|
export * from './CreateSshKeyRequest';
|
|
38
38
|
export * from './CreateWebhookEndpointRequest';
|
|
39
39
|
export * from './CryptoDeposit';
|
|
40
|
+
export * from './DataRetention';
|
|
40
41
|
export * from './DedicatedIPRequest';
|
|
41
42
|
export * from './Embedding';
|
|
42
43
|
export * from './EmbeddingsRequest';
|
|
@@ -112,6 +113,7 @@ export * from './TemplateEnvInner';
|
|
|
112
113
|
export * from './TemplateList';
|
|
113
114
|
export * from './TemplatePortsInner';
|
|
114
115
|
export * from './UpdateBillingDetailsRequest';
|
|
116
|
+
export * from './UpdateDataRetentionRequest';
|
|
115
117
|
export * from './UpdateInstanceRequest';
|
|
116
118
|
export * from './UpdateSpendingLimitRequest';
|
|
117
119
|
export * from './Usage';
|
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.5.
|
|
78
|
+
return { 'User-Agent': 'gpuai-sdk-ts/0.5.3', ...this.configuration.headers };
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
get credentials(): RequestCredentials | undefined {
|