@daocloud-proto/hydra 0.16.0-dev-11 → 0.16.0-dev-13
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.
|
@@ -85,6 +85,16 @@ export type DeleteWSAPIKeyRequest = {
|
|
|
85
85
|
workspace?: number
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
+
export type GetWSAPIKeySecretRequest = {
|
|
89
|
+
id?: string
|
|
90
|
+
workspace?: number
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export type APIKeySecret = {
|
|
94
|
+
id?: string
|
|
95
|
+
key?: string
|
|
96
|
+
}
|
|
97
|
+
|
|
88
98
|
export type UpdateWSAPIKeyQuotaRequest = {
|
|
89
99
|
id?: string
|
|
90
100
|
workspace?: number
|
|
@@ -177,6 +187,12 @@ export class WSAPIKeyManagement {
|
|
|
177
187
|
static ListMyWSAPIKeys(req: ListWSAPIKeyRequest, initReq?: fm.InitReq): Promise<ListAPIKeyResponse> {
|
|
178
188
|
return fm.fetchReq<ListWSAPIKeyRequest, ListAPIKeyResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/my-apikeys?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
179
189
|
}
|
|
190
|
+
static ListWSAPIKeyMasked(req: ListWSAPIKeyRequest, initReq?: fm.InitReq): Promise<ListAPIKeyResponse> {
|
|
191
|
+
return fm.fetchReq<ListWSAPIKeyRequest, ListAPIKeyResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/masked-apikeys?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
192
|
+
}
|
|
193
|
+
static GetWSAPIKeySecret(req: GetWSAPIKeySecretRequest, initReq?: fm.InitReq): Promise<APIKeySecret> {
|
|
194
|
+
return fm.fetchReq<GetWSAPIKeySecretRequest, APIKeySecret>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/apikeys/${req["id"]}/secret?${fm.renderURLSearchParams(req, ["workspace", "id"])}`, {...initReq, method: "GET"})
|
|
195
|
+
}
|
|
180
196
|
static DeleteWSAPIKey(req: DeleteWSAPIKeyRequest, initReq?: fm.InitReq): Promise<APIKey> {
|
|
181
197
|
return fm.fetchReq<DeleteWSAPIKeyRequest, APIKey>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/apikeys/${req["id"]}`, {...initReq, method: "DELETE", body: JSON.stringify(req, fm.replacer)})
|
|
182
198
|
}
|
|
@@ -9,6 +9,15 @@ import * as fm from "../../../fetch.pb"
|
|
|
9
9
|
import * as GoogleProtobufEmpty from "../../../google/protobuf/empty.pb"
|
|
10
10
|
import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
|
|
11
11
|
|
|
12
|
+
type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
|
|
13
|
+
type OneOf<T> =
|
|
14
|
+
| { [k in keyof T]?: undefined }
|
|
15
|
+
| (
|
|
16
|
+
keyof T extends infer K ?
|
|
17
|
+
(K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
|
|
18
|
+
: never)
|
|
19
|
+
: never);
|
|
20
|
+
|
|
12
21
|
export enum ModelSupportFeature {
|
|
13
22
|
MODEL_SUPPORT_TYPE_UNSPECIFIED = "MODEL_SUPPORT_TYPE_UNSPECIFIED",
|
|
14
23
|
TEXT_GENERATION = "TEXT_GENERATION",
|
|
@@ -148,6 +157,9 @@ export type DeployTemplate = {
|
|
|
148
157
|
runtimeCommand?: string
|
|
149
158
|
templateName?: string
|
|
150
159
|
templateDescription?: string
|
|
160
|
+
workerCommand?: string
|
|
161
|
+
workerEnv?: EnvVar[]
|
|
162
|
+
distributed?: boolean
|
|
151
163
|
}
|
|
152
164
|
|
|
153
165
|
export type EnvVar = {
|
|
@@ -251,13 +263,17 @@ export type DeleteModelTemplateRequest = {
|
|
|
251
263
|
modelId?: string
|
|
252
264
|
}
|
|
253
265
|
|
|
254
|
-
|
|
266
|
+
|
|
267
|
+
/* hydra modified */ export type BaseListModelTemplatesRequest = {
|
|
255
268
|
workspace?: number
|
|
256
269
|
modelId?: string
|
|
257
270
|
inferenceRuntime?: string
|
|
258
271
|
page?: HydraCommonCommon.Pagination
|
|
259
272
|
}
|
|
260
273
|
|
|
274
|
+
export type ListModelTemplatesRequest = BaseListModelTemplatesRequest
|
|
275
|
+
& OneOf<{ distributed: boolean }>
|
|
276
|
+
|
|
261
277
|
export type ListModelTemplatesResponse = {
|
|
262
278
|
items?: ModelTemplate[]
|
|
263
279
|
page?: HydraCommonCommon.Pagination
|
|
@@ -65,6 +65,13 @@ export enum DeployDetectConditionType {
|
|
|
65
65
|
MODEL_IMAGE_DOWNLOADED = "MODEL_IMAGE_DOWNLOADED",
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
+
export enum BuiltinEnvVarScope {
|
|
69
|
+
SCOPE_ALL = "SCOPE_ALL",
|
|
70
|
+
SCOPE_DISTRIBUTED = "SCOPE_DISTRIBUTED",
|
|
71
|
+
SCOPE_LEADER = "SCOPE_LEADER",
|
|
72
|
+
SCOPE_WORKER = "SCOPE_WORKER",
|
|
73
|
+
}
|
|
74
|
+
|
|
68
75
|
export enum ModelServingActionRequestAction {
|
|
69
76
|
MODEL_SERVING_ACTION_UNSPECIFIED = "MODEL_SERVING_ACTION_UNSPECIFIED",
|
|
70
77
|
START = "START",
|
|
@@ -157,6 +164,8 @@ export type RuntimeConfig = {
|
|
|
157
164
|
imagePullSecretName?: string[]
|
|
158
165
|
runtimeCommand?: string
|
|
159
166
|
env?: EnvVar[]
|
|
167
|
+
workerCommand?: string
|
|
168
|
+
workerEnv?: EnvVar[]
|
|
160
169
|
}
|
|
161
170
|
|
|
162
171
|
export type CreateModelServingRequest = {
|
|
@@ -349,7 +358,9 @@ export type BuiltinEnvVar = {
|
|
|
349
358
|
}
|
|
350
359
|
|
|
351
360
|
export type ListBuiltinEnvVarsResponse = {
|
|
352
|
-
|
|
361
|
+
single?: BuiltinEnvVar[]
|
|
362
|
+
leader?: BuiltinEnvVar[]
|
|
363
|
+
worker?: BuiltinEnvVar[]
|
|
353
364
|
}
|
|
354
365
|
|
|
355
366
|
export class ModelServingManagement {
|