@scaleway/sdk-inference 1.0.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.
- package/LICENSE +191 -0
- package/dist/index.gen.cjs +6 -0
- package/dist/index.gen.d.ts +6 -0
- package/dist/index.gen.js +6 -0
- package/dist/v1/api.gen.cjs +271 -0
- package/dist/v1/api.gen.d.ts +137 -0
- package/dist/v1/api.gen.js +271 -0
- package/dist/v1/content.gen.cjs +13 -0
- package/dist/v1/content.gen.d.ts +5 -0
- package/dist/v1/content.gen.js +13 -0
- package/dist/v1/index.gen.cjs +22 -0
- package/dist/v1/index.gen.d.ts +5 -0
- package/dist/v1/index.gen.js +22 -0
- package/dist/v1/marshalling.gen.cjs +258 -0
- package/dist/v1/marshalling.gen.d.ts +14 -0
- package/dist/v1/marshalling.gen.js +258 -0
- package/dist/v1/types.gen.d.ts +577 -0
- package/dist/v1/validation-rules.gen.cjs +65 -0
- package/dist/v1/validation-rules.gen.d.ts +57 -0
- package/dist/v1/validation-rules.gen.js +65 -0
- package/dist/v1beta1/api.gen.cjs +301 -0
- package/dist/v1beta1/api.gen.d.ts +148 -0
- package/dist/v1beta1/api.gen.js +301 -0
- package/dist/v1beta1/content.gen.cjs +8 -0
- package/dist/v1beta1/content.gen.d.ts +3 -0
- package/dist/v1beta1/content.gen.js +8 -0
- package/dist/v1beta1/index.gen.cjs +25 -0
- package/dist/v1beta1/index.gen.d.ts +5 -0
- package/dist/v1beta1/index.gen.js +25 -0
- package/dist/v1beta1/marshalling.gen.cjs +271 -0
- package/dist/v1beta1/marshalling.gen.d.ts +18 -0
- package/dist/v1beta1/marshalling.gen.js +271 -0
- package/dist/v1beta1/types.gen.d.ts +622 -0
- package/dist/v1beta1/validation-rules.gen.cjs +56 -0
- package/dist/v1beta1/validation-rules.gen.d.ts +50 -0
- package/dist/v1beta1/validation-rules.gen.js +56 -0
- package/package.json +51 -0
|
@@ -0,0 +1,577 @@
|
|
|
1
|
+
import type { Region as ScwRegion } from '@scaleway/sdk-client';
|
|
2
|
+
export type DeploymentStatus = 'unknown_status' | 'creating' | 'deploying' | 'ready' | 'error' | 'deleting' | 'locked';
|
|
3
|
+
export type ListDeploymentsRequestOrderBy = 'created_at_desc' | 'created_at_asc' | 'name_asc' | 'name_desc';
|
|
4
|
+
export type ListModelsRequestOrderBy = 'display_rank_asc' | 'created_at_asc' | 'created_at_desc' | 'name_asc' | 'name_desc';
|
|
5
|
+
export type ModelStatus = 'unknown_status' | 'preparing' | 'downloading' | 'ready' | 'error';
|
|
6
|
+
export type NodeTypeStock = 'unknown_stock' | 'low_stock' | 'out_of_stock' | 'available';
|
|
7
|
+
export interface ModelSupportedQuantization {
|
|
8
|
+
/**
|
|
9
|
+
* Number of bits for this supported quantization.
|
|
10
|
+
*/
|
|
11
|
+
quantizationBits: number;
|
|
12
|
+
/**
|
|
13
|
+
* Tells whether this quantization is allowed for this node type.
|
|
14
|
+
*/
|
|
15
|
+
allowed: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Maximum inference context size available for this node type and quantization.
|
|
18
|
+
*/
|
|
19
|
+
maxContextSize: number;
|
|
20
|
+
}
|
|
21
|
+
export interface EndpointPrivateNetworkDetails {
|
|
22
|
+
privateNetworkId: string;
|
|
23
|
+
}
|
|
24
|
+
export interface EndpointPublicNetworkDetails {
|
|
25
|
+
}
|
|
26
|
+
export interface ModelSupportedNode {
|
|
27
|
+
/**
|
|
28
|
+
* Supported node type.
|
|
29
|
+
*/
|
|
30
|
+
nodeTypeName: string;
|
|
31
|
+
/**
|
|
32
|
+
* Supported quantizations.
|
|
33
|
+
*/
|
|
34
|
+
quantizations: ModelSupportedQuantization[];
|
|
35
|
+
}
|
|
36
|
+
export interface DeploymentQuantization {
|
|
37
|
+
/**
|
|
38
|
+
* The number of bits each model parameter should be quantized to. The quantization method is chosen based on this value.
|
|
39
|
+
*/
|
|
40
|
+
bits: number;
|
|
41
|
+
}
|
|
42
|
+
export interface Endpoint {
|
|
43
|
+
/**
|
|
44
|
+
* Unique identifier.
|
|
45
|
+
*/
|
|
46
|
+
id: string;
|
|
47
|
+
/**
|
|
48
|
+
* For private endpoints, the URL will be accessible only from the Private Network.
|
|
49
|
+
In addition, private endpoints will expose a CA certificate that can be used to verify the server's identity.
|
|
50
|
+
This CA certificate can be retrieved using the `GetDeploymentCertificate` API call.
|
|
51
|
+
*/
|
|
52
|
+
url: string;
|
|
53
|
+
/**
|
|
54
|
+
* Defines whether the endpoint is public.
|
|
55
|
+
*
|
|
56
|
+
* One-of ('details'): at most one of 'publicNetwork', 'privateNetwork' could be set.
|
|
57
|
+
*/
|
|
58
|
+
publicNetwork?: EndpointPublicNetworkDetails;
|
|
59
|
+
/**
|
|
60
|
+
* Details of the Private Network.
|
|
61
|
+
*
|
|
62
|
+
* One-of ('details'): at most one of 'publicNetwork', 'privateNetwork' could be set.
|
|
63
|
+
*/
|
|
64
|
+
privateNetwork?: EndpointPrivateNetworkDetails;
|
|
65
|
+
/**
|
|
66
|
+
* Defines whether the authentication is disabled.
|
|
67
|
+
*/
|
|
68
|
+
disableAuth: boolean;
|
|
69
|
+
}
|
|
70
|
+
export interface ModelSupportInfo {
|
|
71
|
+
/**
|
|
72
|
+
* List of supported node types.
|
|
73
|
+
*/
|
|
74
|
+
nodes: ModelSupportedNode[];
|
|
75
|
+
}
|
|
76
|
+
export interface EndpointSpec {
|
|
77
|
+
/**
|
|
78
|
+
* Set the endpoint as public.
|
|
79
|
+
*
|
|
80
|
+
* One-of ('details'): at most one of 'publicNetwork', 'privateNetwork' could be set.
|
|
81
|
+
*/
|
|
82
|
+
publicNetwork?: EndpointPublicNetworkDetails;
|
|
83
|
+
/**
|
|
84
|
+
* Private endpoints are only accessible from the Private Network.
|
|
85
|
+
*
|
|
86
|
+
* One-of ('details'): at most one of 'publicNetwork', 'privateNetwork' could be set.
|
|
87
|
+
*/
|
|
88
|
+
privateNetwork?: EndpointPrivateNetworkDetails;
|
|
89
|
+
/**
|
|
90
|
+
* By default, deployments are protected by IAM authentication.
|
|
91
|
+
When setting this field to true, the authentication will be disabled.
|
|
92
|
+
*/
|
|
93
|
+
disableAuth: boolean;
|
|
94
|
+
}
|
|
95
|
+
export interface ModelSource {
|
|
96
|
+
url: string;
|
|
97
|
+
/**
|
|
98
|
+
*
|
|
99
|
+
* One-of ('credentials'): at most one of 'secret' could be set.
|
|
100
|
+
*/
|
|
101
|
+
secret?: string;
|
|
102
|
+
}
|
|
103
|
+
export interface Deployment {
|
|
104
|
+
/**
|
|
105
|
+
* Unique identifier.
|
|
106
|
+
*/
|
|
107
|
+
id: string;
|
|
108
|
+
/**
|
|
109
|
+
* Name of the deployment.
|
|
110
|
+
*/
|
|
111
|
+
name: string;
|
|
112
|
+
/**
|
|
113
|
+
* Project ID.
|
|
114
|
+
*/
|
|
115
|
+
projectId: string;
|
|
116
|
+
/**
|
|
117
|
+
* Status of the deployment.
|
|
118
|
+
*/
|
|
119
|
+
status: DeploymentStatus;
|
|
120
|
+
/**
|
|
121
|
+
* List of tags applied to the deployment.
|
|
122
|
+
*/
|
|
123
|
+
tags: string[];
|
|
124
|
+
/**
|
|
125
|
+
* Node type of the deployment.
|
|
126
|
+
*/
|
|
127
|
+
nodeTypeName: string;
|
|
128
|
+
/**
|
|
129
|
+
* List of endpoints.
|
|
130
|
+
*/
|
|
131
|
+
endpoints: Endpoint[];
|
|
132
|
+
/**
|
|
133
|
+
* Current size of the pool.
|
|
134
|
+
*/
|
|
135
|
+
size: number;
|
|
136
|
+
/**
|
|
137
|
+
* Defines the minimum size of the pool.
|
|
138
|
+
*/
|
|
139
|
+
minSize: number;
|
|
140
|
+
/**
|
|
141
|
+
* Defines the maximum size of the pool.
|
|
142
|
+
*/
|
|
143
|
+
maxSize: number;
|
|
144
|
+
/**
|
|
145
|
+
* Displays information if your deployment is in error state.
|
|
146
|
+
*/
|
|
147
|
+
errorMessage?: string;
|
|
148
|
+
/**
|
|
149
|
+
* ID of the model used for the deployment.
|
|
150
|
+
*/
|
|
151
|
+
modelId: string;
|
|
152
|
+
/**
|
|
153
|
+
* Quantization parameters for this deployment.
|
|
154
|
+
*/
|
|
155
|
+
quantization?: DeploymentQuantization;
|
|
156
|
+
/**
|
|
157
|
+
* Name of the deployed model.
|
|
158
|
+
*/
|
|
159
|
+
modelName: string;
|
|
160
|
+
/**
|
|
161
|
+
* Creation date of the deployment.
|
|
162
|
+
*/
|
|
163
|
+
createdAt?: Date;
|
|
164
|
+
/**
|
|
165
|
+
* Last modification date of the deployment.
|
|
166
|
+
*/
|
|
167
|
+
updatedAt?: Date;
|
|
168
|
+
/**
|
|
169
|
+
* Region of the deployment.
|
|
170
|
+
*/
|
|
171
|
+
region: ScwRegion;
|
|
172
|
+
}
|
|
173
|
+
export interface Model {
|
|
174
|
+
/**
|
|
175
|
+
* Unique identifier.
|
|
176
|
+
*/
|
|
177
|
+
id: string;
|
|
178
|
+
/**
|
|
179
|
+
* Unique Name identifier.
|
|
180
|
+
*/
|
|
181
|
+
name: string;
|
|
182
|
+
/**
|
|
183
|
+
* Project ID.
|
|
184
|
+
*/
|
|
185
|
+
projectId: string;
|
|
186
|
+
/**
|
|
187
|
+
* List of tags applied to the model.
|
|
188
|
+
*/
|
|
189
|
+
tags: string[];
|
|
190
|
+
/**
|
|
191
|
+
* Status of the model.
|
|
192
|
+
*/
|
|
193
|
+
status: ModelStatus;
|
|
194
|
+
/**
|
|
195
|
+
* Purpose of the model.
|
|
196
|
+
*/
|
|
197
|
+
description: string;
|
|
198
|
+
/**
|
|
199
|
+
* Displays information if your model is in error state.
|
|
200
|
+
*/
|
|
201
|
+
errorMessage?: string;
|
|
202
|
+
/**
|
|
203
|
+
* Defines whether the model has an end user license agreement.
|
|
204
|
+
*/
|
|
205
|
+
hasEula: boolean;
|
|
206
|
+
/**
|
|
207
|
+
* Creation date of the model.
|
|
208
|
+
*/
|
|
209
|
+
createdAt?: Date;
|
|
210
|
+
/**
|
|
211
|
+
* Last modification date of the model.
|
|
212
|
+
*/
|
|
213
|
+
updatedAt?: Date;
|
|
214
|
+
/**
|
|
215
|
+
* Region of the model.
|
|
216
|
+
*/
|
|
217
|
+
region: ScwRegion;
|
|
218
|
+
/**
|
|
219
|
+
* Supported nodes types with quantization options and context lengths.
|
|
220
|
+
*/
|
|
221
|
+
nodesSupport: ModelSupportInfo[];
|
|
222
|
+
/**
|
|
223
|
+
* Size, in bits, of the model parameters.
|
|
224
|
+
*/
|
|
225
|
+
parameterSizeBits: number;
|
|
226
|
+
/**
|
|
227
|
+
* Total size, in bytes, of the model files.
|
|
228
|
+
*/
|
|
229
|
+
sizeBytes: number;
|
|
230
|
+
}
|
|
231
|
+
export interface NodeType {
|
|
232
|
+
/**
|
|
233
|
+
* Name of the node type.
|
|
234
|
+
*/
|
|
235
|
+
name: string;
|
|
236
|
+
/**
|
|
237
|
+
* Current stock status for the node type.
|
|
238
|
+
*/
|
|
239
|
+
stockStatus: NodeTypeStock;
|
|
240
|
+
/**
|
|
241
|
+
* Current specs of the offer.
|
|
242
|
+
*/
|
|
243
|
+
description: string;
|
|
244
|
+
/**
|
|
245
|
+
* Number of virtual CPUs.
|
|
246
|
+
*/
|
|
247
|
+
vcpus: number;
|
|
248
|
+
/**
|
|
249
|
+
* Quantity of RAM.
|
|
250
|
+
*/
|
|
251
|
+
memory: number;
|
|
252
|
+
/**
|
|
253
|
+
* Quantity of GPU RAM.
|
|
254
|
+
*/
|
|
255
|
+
vram: number;
|
|
256
|
+
/**
|
|
257
|
+
* The node type is currently disabled.
|
|
258
|
+
*/
|
|
259
|
+
disabled: boolean;
|
|
260
|
+
/**
|
|
261
|
+
* The node type is currently in beta.
|
|
262
|
+
*/
|
|
263
|
+
beta: boolean;
|
|
264
|
+
/**
|
|
265
|
+
* Creation date of the node type.
|
|
266
|
+
*/
|
|
267
|
+
createdAt?: Date;
|
|
268
|
+
/**
|
|
269
|
+
* Last modification date of the node type.
|
|
270
|
+
*/
|
|
271
|
+
updatedAt?: Date;
|
|
272
|
+
/**
|
|
273
|
+
* Number of GPUs.
|
|
274
|
+
*/
|
|
275
|
+
gpus: number;
|
|
276
|
+
/**
|
|
277
|
+
* Region of the node type.
|
|
278
|
+
*/
|
|
279
|
+
region: ScwRegion;
|
|
280
|
+
}
|
|
281
|
+
export type CreateDeploymentRequest = {
|
|
282
|
+
/**
|
|
283
|
+
* Region to target. If none is passed will use default region from the config.
|
|
284
|
+
*/
|
|
285
|
+
region?: ScwRegion;
|
|
286
|
+
/**
|
|
287
|
+
* Name of the deployment.
|
|
288
|
+
*/
|
|
289
|
+
name?: string;
|
|
290
|
+
/**
|
|
291
|
+
* ID of the Project to create the deployment in.
|
|
292
|
+
*/
|
|
293
|
+
projectId?: string;
|
|
294
|
+
/**
|
|
295
|
+
* ID of the model to use.
|
|
296
|
+
*/
|
|
297
|
+
modelId: string;
|
|
298
|
+
/**
|
|
299
|
+
* If the model has an EULA, you must accept it before proceeding.
|
|
300
|
+
The terms of the EULA can be retrieved using the `GetModelEula` API call.
|
|
301
|
+
*/
|
|
302
|
+
acceptEula?: boolean;
|
|
303
|
+
/**
|
|
304
|
+
* Name of the node type to use.
|
|
305
|
+
*/
|
|
306
|
+
nodeTypeName: string;
|
|
307
|
+
/**
|
|
308
|
+
* List of tags to apply to the deployment.
|
|
309
|
+
*/
|
|
310
|
+
tags?: string[];
|
|
311
|
+
/**
|
|
312
|
+
* Defines the minimum size of the pool.
|
|
313
|
+
*/
|
|
314
|
+
minSize?: number;
|
|
315
|
+
/**
|
|
316
|
+
* Defines the maximum size of the pool.
|
|
317
|
+
*/
|
|
318
|
+
maxSize?: number;
|
|
319
|
+
/**
|
|
320
|
+
* List of endpoints to create.
|
|
321
|
+
*/
|
|
322
|
+
endpoints: EndpointSpec[];
|
|
323
|
+
/**
|
|
324
|
+
* Quantization settings to apply to this deployment.
|
|
325
|
+
*/
|
|
326
|
+
quantization?: DeploymentQuantization;
|
|
327
|
+
};
|
|
328
|
+
export type CreateEndpointRequest = {
|
|
329
|
+
/**
|
|
330
|
+
* Region to target. If none is passed will use default region from the config.
|
|
331
|
+
*/
|
|
332
|
+
region?: ScwRegion;
|
|
333
|
+
/**
|
|
334
|
+
* ID of the deployment to create the endpoint for.
|
|
335
|
+
*/
|
|
336
|
+
deploymentId: string;
|
|
337
|
+
/**
|
|
338
|
+
* Specification of the endpoint.
|
|
339
|
+
*/
|
|
340
|
+
endpoint: EndpointSpec;
|
|
341
|
+
};
|
|
342
|
+
export type CreateModelRequest = {
|
|
343
|
+
/**
|
|
344
|
+
* Region to target. If none is passed will use default region from the config.
|
|
345
|
+
*/
|
|
346
|
+
region?: ScwRegion;
|
|
347
|
+
/**
|
|
348
|
+
* Name of the model.
|
|
349
|
+
*/
|
|
350
|
+
name?: string;
|
|
351
|
+
/**
|
|
352
|
+
* ID of the Project to import the model in.
|
|
353
|
+
*/
|
|
354
|
+
projectId?: string;
|
|
355
|
+
/**
|
|
356
|
+
* Where to import the model from.
|
|
357
|
+
*/
|
|
358
|
+
source: ModelSource;
|
|
359
|
+
};
|
|
360
|
+
export type DeleteDeploymentRequest = {
|
|
361
|
+
/**
|
|
362
|
+
* Region to target. If none is passed will use default region from the config.
|
|
363
|
+
*/
|
|
364
|
+
region?: ScwRegion;
|
|
365
|
+
/**
|
|
366
|
+
* ID of the deployment to delete.
|
|
367
|
+
*/
|
|
368
|
+
deploymentId: string;
|
|
369
|
+
};
|
|
370
|
+
export type DeleteEndpointRequest = {
|
|
371
|
+
/**
|
|
372
|
+
* Region to target. If none is passed will use default region from the config.
|
|
373
|
+
*/
|
|
374
|
+
region?: ScwRegion;
|
|
375
|
+
/**
|
|
376
|
+
* ID of the endpoint to delete.
|
|
377
|
+
*/
|
|
378
|
+
endpointId: string;
|
|
379
|
+
};
|
|
380
|
+
export type DeleteModelRequest = {
|
|
381
|
+
/**
|
|
382
|
+
* Region to target. If none is passed will use default region from the config.
|
|
383
|
+
*/
|
|
384
|
+
region?: ScwRegion;
|
|
385
|
+
/**
|
|
386
|
+
* ID of the model to delete.
|
|
387
|
+
*/
|
|
388
|
+
modelId: string;
|
|
389
|
+
};
|
|
390
|
+
export type GetDeploymentCertificateRequest = {
|
|
391
|
+
/**
|
|
392
|
+
* Region to target. If none is passed will use default region from the config.
|
|
393
|
+
*/
|
|
394
|
+
region?: ScwRegion;
|
|
395
|
+
deploymentId: string;
|
|
396
|
+
};
|
|
397
|
+
export type GetDeploymentRequest = {
|
|
398
|
+
/**
|
|
399
|
+
* Region to target. If none is passed will use default region from the config.
|
|
400
|
+
*/
|
|
401
|
+
region?: ScwRegion;
|
|
402
|
+
/**
|
|
403
|
+
* ID of the deployment to get.
|
|
404
|
+
*/
|
|
405
|
+
deploymentId: string;
|
|
406
|
+
};
|
|
407
|
+
export type GetModelRequest = {
|
|
408
|
+
/**
|
|
409
|
+
* Region to target. If none is passed will use default region from the config.
|
|
410
|
+
*/
|
|
411
|
+
region?: ScwRegion;
|
|
412
|
+
/**
|
|
413
|
+
* ID of the model to get.
|
|
414
|
+
*/
|
|
415
|
+
modelId: string;
|
|
416
|
+
};
|
|
417
|
+
export type ListDeploymentsRequest = {
|
|
418
|
+
/**
|
|
419
|
+
* Region to target. If none is passed will use default region from the config.
|
|
420
|
+
*/
|
|
421
|
+
region?: ScwRegion;
|
|
422
|
+
/**
|
|
423
|
+
* Page number to return.
|
|
424
|
+
*/
|
|
425
|
+
page?: number;
|
|
426
|
+
/**
|
|
427
|
+
* Maximum number of deployments to return per page.
|
|
428
|
+
*/
|
|
429
|
+
pageSize?: number;
|
|
430
|
+
/**
|
|
431
|
+
* Order in which to return results.
|
|
432
|
+
*/
|
|
433
|
+
orderBy?: ListDeploymentsRequestOrderBy;
|
|
434
|
+
/**
|
|
435
|
+
* Filter by Project ID.
|
|
436
|
+
*/
|
|
437
|
+
projectId?: string;
|
|
438
|
+
/**
|
|
439
|
+
* Filter by Organization ID.
|
|
440
|
+
*/
|
|
441
|
+
organizationId?: string;
|
|
442
|
+
/**
|
|
443
|
+
* Filter by deployment name.
|
|
444
|
+
*/
|
|
445
|
+
name?: string;
|
|
446
|
+
/**
|
|
447
|
+
* Filter by tags.
|
|
448
|
+
*/
|
|
449
|
+
tags?: string[];
|
|
450
|
+
};
|
|
451
|
+
export interface ListDeploymentsResponse {
|
|
452
|
+
/**
|
|
453
|
+
* List of deployments on the current page.
|
|
454
|
+
*/
|
|
455
|
+
deployments: Deployment[];
|
|
456
|
+
/**
|
|
457
|
+
* Total number of deployments.
|
|
458
|
+
*/
|
|
459
|
+
totalCount: number;
|
|
460
|
+
}
|
|
461
|
+
export type ListModelsRequest = {
|
|
462
|
+
/**
|
|
463
|
+
* Region to target. If none is passed will use default region from the config.
|
|
464
|
+
*/
|
|
465
|
+
region?: ScwRegion;
|
|
466
|
+
/**
|
|
467
|
+
* Order in which to return results.
|
|
468
|
+
*/
|
|
469
|
+
orderBy?: ListModelsRequestOrderBy;
|
|
470
|
+
/**
|
|
471
|
+
* Page number to return.
|
|
472
|
+
*/
|
|
473
|
+
page?: number;
|
|
474
|
+
/**
|
|
475
|
+
* Maximum number of models to return per page.
|
|
476
|
+
*/
|
|
477
|
+
pageSize?: number;
|
|
478
|
+
/**
|
|
479
|
+
* Filter by Project ID.
|
|
480
|
+
*/
|
|
481
|
+
projectId?: string;
|
|
482
|
+
/**
|
|
483
|
+
* Filter by model name.
|
|
484
|
+
*/
|
|
485
|
+
name?: string;
|
|
486
|
+
/**
|
|
487
|
+
* Filter by tags.
|
|
488
|
+
*/
|
|
489
|
+
tags?: string[];
|
|
490
|
+
};
|
|
491
|
+
export interface ListModelsResponse {
|
|
492
|
+
/**
|
|
493
|
+
* List of models on the current page.
|
|
494
|
+
*/
|
|
495
|
+
models: Model[];
|
|
496
|
+
/**
|
|
497
|
+
* Total number of models.
|
|
498
|
+
*/
|
|
499
|
+
totalCount: number;
|
|
500
|
+
}
|
|
501
|
+
export type ListNodeTypesRequest = {
|
|
502
|
+
/**
|
|
503
|
+
* Region to target. If none is passed will use default region from the config.
|
|
504
|
+
*/
|
|
505
|
+
region?: ScwRegion;
|
|
506
|
+
/**
|
|
507
|
+
* Page number to return.
|
|
508
|
+
*/
|
|
509
|
+
page?: number;
|
|
510
|
+
/**
|
|
511
|
+
* Maximum number of node types to return per page.
|
|
512
|
+
*/
|
|
513
|
+
pageSize?: number;
|
|
514
|
+
/**
|
|
515
|
+
* Include disabled node types in the response.
|
|
516
|
+
*/
|
|
517
|
+
includeDisabledTypes: boolean;
|
|
518
|
+
};
|
|
519
|
+
export interface ListNodeTypesResponse {
|
|
520
|
+
/**
|
|
521
|
+
* List of node types.
|
|
522
|
+
*/
|
|
523
|
+
nodeTypes: NodeType[];
|
|
524
|
+
/**
|
|
525
|
+
* Total number of node types.
|
|
526
|
+
*/
|
|
527
|
+
totalCount: number;
|
|
528
|
+
}
|
|
529
|
+
export type UpdateDeploymentRequest = {
|
|
530
|
+
/**
|
|
531
|
+
* Region to target. If none is passed will use default region from the config.
|
|
532
|
+
*/
|
|
533
|
+
region?: ScwRegion;
|
|
534
|
+
/**
|
|
535
|
+
* ID of the deployment to update.
|
|
536
|
+
*/
|
|
537
|
+
deploymentId: string;
|
|
538
|
+
/**
|
|
539
|
+
* Name of the deployment.
|
|
540
|
+
*/
|
|
541
|
+
name?: string;
|
|
542
|
+
/**
|
|
543
|
+
* List of tags to apply to the deployment.
|
|
544
|
+
*/
|
|
545
|
+
tags?: string[];
|
|
546
|
+
/**
|
|
547
|
+
* Defines the new minimum size of the pool.
|
|
548
|
+
*/
|
|
549
|
+
minSize?: number;
|
|
550
|
+
/**
|
|
551
|
+
* Defines the new maximum size of the pool.
|
|
552
|
+
*/
|
|
553
|
+
maxSize?: number;
|
|
554
|
+
/**
|
|
555
|
+
* Id of the model to set to the deployment.
|
|
556
|
+
*/
|
|
557
|
+
modelId?: string;
|
|
558
|
+
/**
|
|
559
|
+
* Quantization to use to the deployment.
|
|
560
|
+
*/
|
|
561
|
+
quantization?: DeploymentQuantization;
|
|
562
|
+
};
|
|
563
|
+
export type UpdateEndpointRequest = {
|
|
564
|
+
/**
|
|
565
|
+
* Region to target. If none is passed will use default region from the config.
|
|
566
|
+
*/
|
|
567
|
+
region?: ScwRegion;
|
|
568
|
+
/**
|
|
569
|
+
* ID of the endpoint to update.
|
|
570
|
+
*/
|
|
571
|
+
endpointId: string;
|
|
572
|
+
/**
|
|
573
|
+
* By default, deployments are protected by IAM authentication.
|
|
574
|
+
When setting this field to true, the authentication will be disabled.
|
|
575
|
+
*/
|
|
576
|
+
disableAuth?: boolean;
|
|
577
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const CreateDeploymentRequest = {
|
|
4
|
+
maxSize: {
|
|
5
|
+
greaterThanOrEqual: 1,
|
|
6
|
+
lessThanOrEqual: 50
|
|
7
|
+
},
|
|
8
|
+
minSize: {
|
|
9
|
+
greaterThanOrEqual: 1,
|
|
10
|
+
lessThanOrEqual: 50
|
|
11
|
+
},
|
|
12
|
+
name: {
|
|
13
|
+
maxLength: 255,
|
|
14
|
+
minLength: 1,
|
|
15
|
+
pattern: /^[A-Za-z0-9-_]+$/
|
|
16
|
+
},
|
|
17
|
+
nodeTypeName: {
|
|
18
|
+
maxLength: 64,
|
|
19
|
+
minLength: 1
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
const CreateModelRequest = {
|
|
23
|
+
name: {
|
|
24
|
+
maxLength: 255,
|
|
25
|
+
minLength: 1,
|
|
26
|
+
pattern: /^[A-Za-z0-9-_/.:]+$/
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
const DeploymentQuantization = {
|
|
30
|
+
bits: {
|
|
31
|
+
lessThanOrEqual: 32
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
const ListDeploymentsRequest = {
|
|
35
|
+
name: {
|
|
36
|
+
maxLength: 255,
|
|
37
|
+
minLength: 1
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
const ListModelsRequest = {
|
|
41
|
+
name: {
|
|
42
|
+
maxLength: 255,
|
|
43
|
+
minLength: 1
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
const UpdateDeploymentRequest = {
|
|
47
|
+
maxSize: {
|
|
48
|
+
greaterThanOrEqual: 1,
|
|
49
|
+
lessThanOrEqual: 50
|
|
50
|
+
},
|
|
51
|
+
minSize: {
|
|
52
|
+
greaterThanOrEqual: 1,
|
|
53
|
+
lessThanOrEqual: 50
|
|
54
|
+
},
|
|
55
|
+
name: {
|
|
56
|
+
maxLength: 255,
|
|
57
|
+
minLength: 1
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
exports.CreateDeploymentRequest = CreateDeploymentRequest;
|
|
61
|
+
exports.CreateModelRequest = CreateModelRequest;
|
|
62
|
+
exports.DeploymentQuantization = DeploymentQuantization;
|
|
63
|
+
exports.ListDeploymentsRequest = ListDeploymentsRequest;
|
|
64
|
+
exports.ListModelsRequest = ListModelsRequest;
|
|
65
|
+
exports.UpdateDeploymentRequest = UpdateDeploymentRequest;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export declare const CreateDeploymentRequest: {
|
|
2
|
+
maxSize: {
|
|
3
|
+
greaterThanOrEqual: number;
|
|
4
|
+
lessThanOrEqual: number;
|
|
5
|
+
};
|
|
6
|
+
minSize: {
|
|
7
|
+
greaterThanOrEqual: number;
|
|
8
|
+
lessThanOrEqual: number;
|
|
9
|
+
};
|
|
10
|
+
name: {
|
|
11
|
+
maxLength: number;
|
|
12
|
+
minLength: number;
|
|
13
|
+
pattern: RegExp;
|
|
14
|
+
};
|
|
15
|
+
nodeTypeName: {
|
|
16
|
+
maxLength: number;
|
|
17
|
+
minLength: number;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export declare const CreateModelRequest: {
|
|
21
|
+
name: {
|
|
22
|
+
maxLength: number;
|
|
23
|
+
minLength: number;
|
|
24
|
+
pattern: RegExp;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export declare const DeploymentQuantization: {
|
|
28
|
+
bits: {
|
|
29
|
+
lessThanOrEqual: number;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export declare const ListDeploymentsRequest: {
|
|
33
|
+
name: {
|
|
34
|
+
maxLength: number;
|
|
35
|
+
minLength: number;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
export declare const ListModelsRequest: {
|
|
39
|
+
name: {
|
|
40
|
+
maxLength: number;
|
|
41
|
+
minLength: number;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
export declare const UpdateDeploymentRequest: {
|
|
45
|
+
maxSize: {
|
|
46
|
+
greaterThanOrEqual: number;
|
|
47
|
+
lessThanOrEqual: number;
|
|
48
|
+
};
|
|
49
|
+
minSize: {
|
|
50
|
+
greaterThanOrEqual: number;
|
|
51
|
+
lessThanOrEqual: number;
|
|
52
|
+
};
|
|
53
|
+
name: {
|
|
54
|
+
maxLength: number;
|
|
55
|
+
minLength: number;
|
|
56
|
+
};
|
|
57
|
+
};
|