@daocloud-proto/hydra 0.10.0 → 0.11.0-dev-4
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/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
|
}
|