@daocloud-proto/hydra 0.16.0-rc1-dev-5 → 0.16.0-rc1-dev-7
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.
|
@@ -0,0 +1,76 @@
|
|
|
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 fm from "../../../fetch.pb"
|
|
8
|
+
export type CostMockConfig = {
|
|
9
|
+
gpus?: GPUCost[]
|
|
10
|
+
upstreamTokenPrices?: UpstreamTokenPrice[]
|
|
11
|
+
upstreamTotalTokenPrices?: UpstreamTotalTokenPrice[]
|
|
12
|
+
excludedGpuCostKeys?: string[]
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type GPUCost = {
|
|
16
|
+
clusterName?: string
|
|
17
|
+
nodeName?: string
|
|
18
|
+
product?: string
|
|
19
|
+
memory?: string
|
|
20
|
+
price?: number
|
|
21
|
+
count?: number
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type UpstreamTokenPrice = {
|
|
25
|
+
name?: string
|
|
26
|
+
maasModelName?: string
|
|
27
|
+
inPrice?: number
|
|
28
|
+
outPrice?: number
|
|
29
|
+
cachedPrice?: number
|
|
30
|
+
inputImagePrice?: number
|
|
31
|
+
outputImagePrice?: number
|
|
32
|
+
inputAudioPrice?: number
|
|
33
|
+
outputAudioPrice?: number
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export type UpstreamTotalTokenPrice = {
|
|
37
|
+
name?: string
|
|
38
|
+
maasModelName?: string
|
|
39
|
+
expirationTime?: string
|
|
40
|
+
inputTokenHourlyPrice?: number
|
|
41
|
+
outputTokenHourlyPrice?: number
|
|
42
|
+
cachedTokenHourlyPrice?: number
|
|
43
|
+
inputImageHourlyPrice?: number
|
|
44
|
+
outputImageHourlyPrice?: number
|
|
45
|
+
inputAudioHourlyPrice?: number
|
|
46
|
+
outputAudioHourlyPrice?: number
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export type CreateCostMockConfigRequest = {
|
|
50
|
+
config?: CostMockConfig
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export type GetCostMockConfigRequest = {
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export type UpdateCostMockConfigRequest = {
|
|
57
|
+
config?: CostMockConfig
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export type DeleteCostMockConfigRequest = {
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export class CostMockConfigManagement {
|
|
64
|
+
static CreateCostMockConfig(req: CreateCostMockConfigRequest, initReq?: fm.InitReq): Promise<CostMockConfig> {
|
|
65
|
+
return fm.fetchReq<CreateCostMockConfigRequest, CostMockConfig>(`/apis/admin.hydra.io/v1alpha1/cost-mock-config`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
66
|
+
}
|
|
67
|
+
static GetCostMockConfig(req: GetCostMockConfigRequest, initReq?: fm.InitReq): Promise<CostMockConfig> {
|
|
68
|
+
return fm.fetchReq<GetCostMockConfigRequest, CostMockConfig>(`/apis/admin.hydra.io/v1alpha1/cost-mock-config?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
69
|
+
}
|
|
70
|
+
static UpdateCostMockConfig(req: UpdateCostMockConfigRequest, initReq?: fm.InitReq): Promise<CostMockConfig> {
|
|
71
|
+
return fm.fetchReq<UpdateCostMockConfigRequest, CostMockConfig>(`/apis/admin.hydra.io/v1alpha1/cost-mock-config`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
72
|
+
}
|
|
73
|
+
static DeleteCostMockConfig(req: DeleteCostMockConfigRequest, initReq?: fm.InitReq): Promise<CostMockConfig> {
|
|
74
|
+
return fm.fetchReq<DeleteCostMockConfigRequest, CostMockConfig>(`/apis/admin.hydra.io/v1alpha1/cost-mock-config`, {...initReq, method: "DELETE"})
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -338,6 +338,19 @@ export type DeployDetectCondition = {
|
|
|
338
338
|
message?: string
|
|
339
339
|
}
|
|
340
340
|
|
|
341
|
+
export type ListBuiltinEnvVarsRequest = {
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
export type BuiltinEnvVar = {
|
|
345
|
+
name?: string
|
|
346
|
+
description?: string
|
|
347
|
+
example?: string
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
export type ListBuiltinEnvVarsResponse = {
|
|
351
|
+
items?: BuiltinEnvVar[]
|
|
352
|
+
}
|
|
353
|
+
|
|
341
354
|
export class ModelServingManagement {
|
|
342
355
|
static CreateModelServing(req: CreateModelServingRequest, initReq?: fm.InitReq): Promise<ModelServing> {
|
|
343
356
|
return fm.fetchReq<CreateModelServingRequest, ModelServing>(`/apis/hydra.io/v1alpha1/model-serving`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
@@ -380,4 +393,7 @@ export class WSModelServingManagement {
|
|
|
380
393
|
static DoModelWSServingAction(req: WSModelServingActionRequest, initReq?: fm.InitReq): Promise<WSModelServing> {
|
|
381
394
|
return fm.fetchReq<WSModelServingActionRequest, WSModelServing>(`/apis/hydra.io/v1alpha1/workspaces/${req["workspace"]}/model-serving/${req["id"]}/actions`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
382
395
|
}
|
|
396
|
+
static ListBuiltinEnvVars(req: ListBuiltinEnvVarsRequest, initReq?: fm.InitReq): Promise<ListBuiltinEnvVarsResponse> {
|
|
397
|
+
return fm.fetchReq<ListBuiltinEnvVarsRequest, ListBuiltinEnvVarsResponse>(`/apis/hydra.io/v1alpha1/model-serving/builtin-env-vars?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
398
|
+
}
|
|
383
399
|
}
|
package/package.json
CHANGED
|
@@ -1,62 +0,0 @@
|
|
|
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 fm from "../../../fetch.pb"
|
|
8
|
-
export type CostMockConfig = {
|
|
9
|
-
gpuCosts?: GPUCost[]
|
|
10
|
-
maasUsageCosts?: MaasUsageCost[]
|
|
11
|
-
maasTimeBoundPackageCosts?: MaaSTimeBoundPackageCost[]
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export type GPUCost = {
|
|
15
|
-
productName?: string
|
|
16
|
-
sn?: string
|
|
17
|
-
cluster?: string
|
|
18
|
-
hourlyPrice?: number
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export type MaasUsageCost = {
|
|
22
|
-
upstreamModelName?: string
|
|
23
|
-
inputPrice?: number
|
|
24
|
-
cachedInputPrice?: number
|
|
25
|
-
outputPrice?: number
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export type MaaSTimeBoundPackageCost = {
|
|
29
|
-
upstreamModelName?: string
|
|
30
|
-
hourlyInputPrice?: number
|
|
31
|
-
hourlyCachedInputPrice?: number
|
|
32
|
-
hourlyOutputPrice?: number
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export type CreateCostMockConfigRequest = {
|
|
36
|
-
config?: CostMockConfig
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export type GetCostMockConfigRequest = {
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export type UpdateCostMockConfigRequest = {
|
|
43
|
-
config?: CostMockConfig
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export type DeleteCostMockConfigRequest = {
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export class CostMockConfigManagement {
|
|
50
|
-
static CreateCostMockConfig(req: CreateCostMockConfigRequest, initReq?: fm.InitReq): Promise<CostMockConfig> {
|
|
51
|
-
return fm.fetchReq<CreateCostMockConfigRequest, CostMockConfig>(`/apis/hydra.io/v1alpha1/analysis-center/cost-mock-config`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
52
|
-
}
|
|
53
|
-
static GetCostMockConfig(req: GetCostMockConfigRequest, initReq?: fm.InitReq): Promise<CostMockConfig> {
|
|
54
|
-
return fm.fetchReq<GetCostMockConfigRequest, CostMockConfig>(`/apis/hydra.io/v1alpha1/analysis-center/cost-mock-config?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
55
|
-
}
|
|
56
|
-
static UpdateCostMockConfig(req: UpdateCostMockConfigRequest, initReq?: fm.InitReq): Promise<CostMockConfig> {
|
|
57
|
-
return fm.fetchReq<UpdateCostMockConfigRequest, CostMockConfig>(`/apis/hydra.io/v1alpha1/analysis-center/cost-mock-config`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
58
|
-
}
|
|
59
|
-
static DeleteCostMockConfig(req: DeleteCostMockConfigRequest, initReq?: fm.InitReq): Promise<CostMockConfig> {
|
|
60
|
-
return fm.fetchReq<DeleteCostMockConfigRequest, CostMockConfig>(`/apis/hydra.io/v1alpha1/analysis-center/cost-mock-config`, {...initReq, method: "DELETE"})
|
|
61
|
-
}
|
|
62
|
-
}
|