@daocloud-proto/hydra 0.10.0 → 0.11.0-dev-6
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/admin-api/model/v1alpha1/model_weights_volume.pb.ts +94 -0
- package/common/common.pb.ts +1 -0
- package/common/errorcode.ts +3 -0
- package/management-api/core/v1alpha1/management.pb.ts +2 -1
- package/management-api/model/v1alpha1/model.pb.ts +43 -0
- package/management-api/model/v1alpha1/model_weights_volume.pb.ts +99 -0
- package/package.json +1 -1
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
/*
|
|
4
|
+
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import * as HydraCommonCommon from "../../../common/common.pb"
|
|
8
|
+
import * as fm from "../../../fetch.pb"
|
|
9
|
+
import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
|
|
10
|
+
|
|
11
|
+
export enum StorageSourceType {
|
|
12
|
+
STORAGE_SOURCE_TYPE_UNSPECIFIED = "STORAGE_SOURCE_TYPE_UNSPECIFIED",
|
|
13
|
+
FILES_STORAGE = "FILES_STORAGE",
|
|
14
|
+
PVC_STORAGE = "PVC_STORAGE",
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type ModelWeightsVolume = {
|
|
18
|
+
id?: string
|
|
19
|
+
modelId?: string
|
|
20
|
+
modelTag?: string
|
|
21
|
+
clusterName?: string
|
|
22
|
+
storageSource?: StorageSourceType
|
|
23
|
+
storageRef?: string
|
|
24
|
+
subPath?: string
|
|
25
|
+
mountPath?: string
|
|
26
|
+
creationTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
27
|
+
updateTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type CreateModelWeightsVolumeRequest = {
|
|
31
|
+
id?: string
|
|
32
|
+
modelId?: string
|
|
33
|
+
clusterName?: string
|
|
34
|
+
modelTag?: string
|
|
35
|
+
storageSource?: StorageSourceType
|
|
36
|
+
storageRef?: string
|
|
37
|
+
subPath?: string
|
|
38
|
+
mountPath?: string
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export type UpdateModelWeightsVolumeRequest = {
|
|
42
|
+
id?: string
|
|
43
|
+
modelId?: string
|
|
44
|
+
clusterName?: string
|
|
45
|
+
modelTag?: string
|
|
46
|
+
storageSource?: StorageSourceType
|
|
47
|
+
storageRef?: string
|
|
48
|
+
subPath?: string
|
|
49
|
+
mountPath?: string
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export type SingleModelWeightsVolumeRequest = {
|
|
53
|
+
id?: string
|
|
54
|
+
modelId?: string
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export type ListModelWeightsVolumesRequest = {
|
|
58
|
+
modelId?: string
|
|
59
|
+
page?: HydraCommonCommon.Pagination
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export type ListModelWeightsVolumesResponse = {
|
|
63
|
+
items?: ModelWeightsVolume[]
|
|
64
|
+
page?: HydraCommonCommon.Pagination
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export type GetStorageSourceRequest = {
|
|
68
|
+
modelId?: string
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export type GetStorageSourceResponse = {
|
|
72
|
+
sources?: {[key: string]: number}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export class AdminModelWeightsVolumeManagement {
|
|
76
|
+
static CreateModelWeightsVolume(req: CreateModelWeightsVolumeRequest, initReq?: fm.InitReq): Promise<ModelWeightsVolume> {
|
|
77
|
+
return fm.fetchReq<CreateModelWeightsVolumeRequest, ModelWeightsVolume>(`/apis/admin.hydra.io/v1alpha1/models/${req["modelId"]}/weights`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
78
|
+
}
|
|
79
|
+
static UpdateModelWeightsVolume(req: UpdateModelWeightsVolumeRequest, initReq?: fm.InitReq): Promise<ModelWeightsVolume> {
|
|
80
|
+
return fm.fetchReq<UpdateModelWeightsVolumeRequest, ModelWeightsVolume>(`/apis/admin.hydra.io/v1alpha1/models/${req["modelId"]}/weights/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
81
|
+
}
|
|
82
|
+
static DeleteModelWeightsVolume(req: SingleModelWeightsVolumeRequest, initReq?: fm.InitReq): Promise<ModelWeightsVolume> {
|
|
83
|
+
return fm.fetchReq<SingleModelWeightsVolumeRequest, ModelWeightsVolume>(`/apis/admin.hydra.io/v1alpha1/models/${req["modelId"]}/weights/${req["id"]}`, {...initReq, method: "DELETE"})
|
|
84
|
+
}
|
|
85
|
+
static GetModelWeightsVolume(req: SingleModelWeightsVolumeRequest, initReq?: fm.InitReq): Promise<ModelWeightsVolume> {
|
|
86
|
+
return fm.fetchReq<SingleModelWeightsVolumeRequest, ModelWeightsVolume>(`/apis/admin.hydra.io/v1alpha1/models/${req["modelId"]}/weights/${req["id"]}?${fm.renderURLSearchParams(req, ["modelId", "id"])}`, {...initReq, method: "GET"})
|
|
87
|
+
}
|
|
88
|
+
static ListModelWeightsVolumes(req: ListModelWeightsVolumesRequest, initReq?: fm.InitReq): Promise<ListModelWeightsVolumesResponse> {
|
|
89
|
+
return fm.fetchReq<ListModelWeightsVolumesRequest, ListModelWeightsVolumesResponse>(`/apis/admin.hydra.io/v1alpha1/models/${req["modelId"]}/weights?${fm.renderURLSearchParams(req, ["modelId"])}`, {...initReq, method: "GET"})
|
|
90
|
+
}
|
|
91
|
+
static GetStorageSource(req: GetStorageSourceRequest, initReq?: fm.InitReq): Promise<GetStorageSourceResponse> {
|
|
92
|
+
return fm.fetchReq<GetStorageSourceRequest, GetStorageSourceResponse>(`/apis/admin.hydra.io/v1alpha1/models/${req["modelId"]}/weights:storage-source?${fm.renderURLSearchParams(req, ["modelId"])}`, {...initReq, method: "GET"})
|
|
93
|
+
}
|
|
94
|
+
}
|
package/common/common.pb.ts
CHANGED
package/common/errorcode.ts
CHANGED
|
@@ -21,6 +21,9 @@ export enum ErrorCode {
|
|
|
21
21
|
// EN: out of inventory, can not create.
|
|
22
22
|
// ZH: 库存不足,无法创建。
|
|
23
23
|
SYSTEM_OUT_OF_INVENTORY = "SYSTEM-OUT_OF_INVENTORY",
|
|
24
|
+
// EN: sub-account balance limit exceeded.
|
|
25
|
+
// ZH: 子账号可用额度不足。
|
|
26
|
+
SYSTEM_OUT_OF_VIRTUAL_BALANCE = "SYSTEM-OUT_OF_VIRTUAL_BALANCE",
|
|
24
27
|
// EN: request params error: %v
|
|
25
28
|
// ZH: 请求参数错误:%v
|
|
26
29
|
SYSTEM_PARAMS_ERROR = "SYSTEM-PARAMS_ERROR",
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import * as HydraCommonCommon from "../../../common/common.pb"
|
|
7
8
|
import * as fm from "../../../fetch.pb"
|
|
8
9
|
export type GetWebSearchAgentConfigRequest = {
|
|
9
10
|
}
|
|
@@ -24,7 +25,7 @@ export type ListInferenceRuntimesResponse = {
|
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
export type InferenceRuntime = {
|
|
27
|
-
name?:
|
|
28
|
+
name?: HydraCommonCommon.I18nName
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
export class Management {
|
|
@@ -68,6 +68,7 @@ export type Model = {
|
|
|
68
68
|
readme?: HydraCommonCommon.I18nName
|
|
69
69
|
publicModelConfig?: PublicModelConfig
|
|
70
70
|
modelDeploymentsExists?: boolean
|
|
71
|
+
visible?: string
|
|
71
72
|
}
|
|
72
73
|
|
|
73
74
|
export type ListModelRequest = {
|
|
@@ -152,6 +153,33 @@ export type WSModel = {
|
|
|
152
153
|
readme?: HydraCommonCommon.I18nName
|
|
153
154
|
publicModelConfig?: PublicModelConfig
|
|
154
155
|
modelDeploymentsExists?: boolean
|
|
156
|
+
visible?: string
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export type CreatePrivateModelRequest = {
|
|
160
|
+
workspace?: number
|
|
161
|
+
modelAvatar?: string
|
|
162
|
+
modelName?: string
|
|
163
|
+
modelDescription?: HydraCommonCommon.I18nName
|
|
164
|
+
modelSupportFeature?: ModelSupportFeature[]
|
|
165
|
+
readme?: HydraCommonCommon.I18nName
|
|
166
|
+
servingSpec?: ModelServingSpec
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export type UpdatePrivateModelRequest = {
|
|
170
|
+
workspace?: number
|
|
171
|
+
modelId?: string
|
|
172
|
+
modelAvatar?: string
|
|
173
|
+
modelName?: string
|
|
174
|
+
modelDescription?: HydraCommonCommon.I18nName
|
|
175
|
+
modelSupportFeature?: ModelSupportFeature[]
|
|
176
|
+
readme?: HydraCommonCommon.I18nName
|
|
177
|
+
servingSpec?: ModelServingSpec
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export type ListPrivateModelRequest = {
|
|
181
|
+
workspace?: number
|
|
182
|
+
page?: HydraCommonCommon.Pagination
|
|
155
183
|
}
|
|
156
184
|
|
|
157
185
|
export class ModelManagement {
|
|
@@ -169,4 +197,19 @@ export class WSModelManagement {
|
|
|
169
197
|
static ListWSModels(req: ListWSModelRequest, initReq?: fm.InitReq): Promise<ListWSModelResponse> {
|
|
170
198
|
return fm.fetchReq<ListWSModelRequest, ListWSModelResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/models?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
171
199
|
}
|
|
200
|
+
static ListPrivateModels(req: ListPrivateModelRequest, initReq?: fm.InitReq): Promise<ListWSModelResponse> {
|
|
201
|
+
return fm.fetchReq<ListPrivateModelRequest, ListWSModelResponse>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/private-models?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
202
|
+
}
|
|
203
|
+
static GetPrivateModel(req: SingleWSModelRequest, initReq?: fm.InitReq): Promise<WSModel> {
|
|
204
|
+
return fm.fetchReq<SingleWSModelRequest, WSModel>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/private-models/${req["modelId"]}?${fm.renderURLSearchParams(req, ["workspace", "modelId"])}`, {...initReq, method: "GET"})
|
|
205
|
+
}
|
|
206
|
+
static CreatePrivateModel(req: CreatePrivateModelRequest, initReq?: fm.InitReq): Promise<WSModel> {
|
|
207
|
+
return fm.fetchReq<CreatePrivateModelRequest, WSModel>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/private-models`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
208
|
+
}
|
|
209
|
+
static UpdatePrivateModel(req: UpdatePrivateModelRequest, initReq?: fm.InitReq): Promise<WSModel> {
|
|
210
|
+
return fm.fetchReq<UpdatePrivateModelRequest, WSModel>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/private-models/${req["modelId"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
211
|
+
}
|
|
212
|
+
static DeletePrivateModel(req: SingleWSModelRequest, initReq?: fm.InitReq): Promise<WSModel> {
|
|
213
|
+
return fm.fetchReq<SingleWSModelRequest, WSModel>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/private-models/${req["modelId"]}`, {...initReq, method: "DELETE"})
|
|
214
|
+
}
|
|
172
215
|
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
/*
|
|
4
|
+
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import * as HydraCommonCommon from "../../../common/common.pb"
|
|
8
|
+
import * as fm from "../../../fetch.pb"
|
|
9
|
+
import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
|
|
10
|
+
|
|
11
|
+
export enum StorageSourceType {
|
|
12
|
+
STORAGE_SOURCE_TYPE_UNSPECIFIED = "STORAGE_SOURCE_TYPE_UNSPECIFIED",
|
|
13
|
+
FILES_STORAGE = "FILES_STORAGE",
|
|
14
|
+
PVC_STORAGE = "PVC_STORAGE",
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type WSModelWeightsVolume = {
|
|
18
|
+
id?: string
|
|
19
|
+
modelId?: string
|
|
20
|
+
modelTag?: string
|
|
21
|
+
clusterName?: string
|
|
22
|
+
storageSource?: StorageSourceType
|
|
23
|
+
storageRef?: string
|
|
24
|
+
subPath?: string
|
|
25
|
+
mountPath?: string
|
|
26
|
+
creationTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
27
|
+
updateTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type CreateWSModelWeightsVolumeRequest = {
|
|
31
|
+
workspace?: number
|
|
32
|
+
id?: string
|
|
33
|
+
modelId?: string
|
|
34
|
+
clusterName?: string
|
|
35
|
+
modelTag?: string
|
|
36
|
+
storageSource?: StorageSourceType
|
|
37
|
+
storageRef?: string
|
|
38
|
+
subPath?: string
|
|
39
|
+
mountPath?: string
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export type UpdateWSModelWeightsVolumeRequest = {
|
|
43
|
+
workspace?: number
|
|
44
|
+
id?: string
|
|
45
|
+
modelId?: string
|
|
46
|
+
clusterName?: string
|
|
47
|
+
modelTag?: string
|
|
48
|
+
storageSource?: StorageSourceType
|
|
49
|
+
storageRef?: string
|
|
50
|
+
subPath?: string
|
|
51
|
+
mountPath?: string
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export type SingleWSModelWeightsVolumeRequest = {
|
|
55
|
+
workspace?: number
|
|
56
|
+
id?: string
|
|
57
|
+
modelId?: string
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export type ListWSModelWeightsVolumesRequest = {
|
|
61
|
+
workspace?: number
|
|
62
|
+
modelId?: string
|
|
63
|
+
page?: HydraCommonCommon.Pagination
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export type ListWSModelWeightsVolumesResponse = {
|
|
67
|
+
items?: WSModelWeightsVolume[]
|
|
68
|
+
page?: HydraCommonCommon.Pagination
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export type GetWSStorageSourceRequest = {
|
|
72
|
+
workspace?: number
|
|
73
|
+
modelId?: string
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export type GetWSStorageSourceResponse = {
|
|
77
|
+
sources?: {[key: string]: number}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export class WSModelWeightsVolumeManagement {
|
|
81
|
+
static CreateWSModelWeightsVolume(req: CreateWSModelWeightsVolumeRequest, initReq?: fm.InitReq): Promise<WSModelWeightsVolume> {
|
|
82
|
+
return fm.fetchReq<CreateWSModelWeightsVolumeRequest, WSModelWeightsVolume>(`/apis/hydra.io/v1alpha1/models/${req["modelId"]}/workspaces/${req["workspace"]}/weights`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
83
|
+
}
|
|
84
|
+
static UpdateWSModelWeightsVolume(req: UpdateWSModelWeightsVolumeRequest, initReq?: fm.InitReq): Promise<WSModelWeightsVolume> {
|
|
85
|
+
return fm.fetchReq<UpdateWSModelWeightsVolumeRequest, WSModelWeightsVolume>(`/apis/hydra.io/v1alpha1/models/${req["modelId"]}/workspaces/${req["workspace"]}/weights/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
86
|
+
}
|
|
87
|
+
static DeleteWSModelWeightsVolume(req: SingleWSModelWeightsVolumeRequest, initReq?: fm.InitReq): Promise<WSModelWeightsVolume> {
|
|
88
|
+
return fm.fetchReq<SingleWSModelWeightsVolumeRequest, WSModelWeightsVolume>(`/apis/hydra.io/v1alpha1/models/${req["modelId"]}/workspaces/${req["workspace"]}/weights/${req["id"]}`, {...initReq, method: "DELETE"})
|
|
89
|
+
}
|
|
90
|
+
static GetWSModelWeightsVolume(req: SingleWSModelWeightsVolumeRequest, initReq?: fm.InitReq): Promise<WSModelWeightsVolume> {
|
|
91
|
+
return fm.fetchReq<SingleWSModelWeightsVolumeRequest, WSModelWeightsVolume>(`/apis/hydra.io/v1alpha1/models/${req["modelId"]}/workspaces/${req["workspace"]}/weights/${req["id"]}?${fm.renderURLSearchParams(req, ["modelId", "workspace", "id"])}`, {...initReq, method: "GET"})
|
|
92
|
+
}
|
|
93
|
+
static ListWSModelWeightsVolumes(req: ListWSModelWeightsVolumesRequest, initReq?: fm.InitReq): Promise<ListWSModelWeightsVolumesResponse> {
|
|
94
|
+
return fm.fetchReq<ListWSModelWeightsVolumesRequest, ListWSModelWeightsVolumesResponse>(`/apis/hydra.io/v1alpha1/models/${req["modelId"]}/workspaces/${req["workspace"]}/weights?${fm.renderURLSearchParams(req, ["modelId", "workspace"])}`, {...initReq, method: "GET"})
|
|
95
|
+
}
|
|
96
|
+
static GetWSStorageSource(req: GetWSStorageSourceRequest, initReq?: fm.InitReq): Promise<GetWSStorageSourceResponse> {
|
|
97
|
+
return fm.fetchReq<GetWSStorageSourceRequest, GetWSStorageSourceResponse>(`/apis/hydra.io/v1alpha1/models/${req["modelId"]}/workspaces/${req["workspace"]}/weights:storage-source?${fm.renderURLSearchParams(req, ["modelId", "workspace"])}`, {...initReq, method: "GET"})
|
|
98
|
+
}
|
|
99
|
+
}
|