@daocloud-proto/hydra 0.16.0-rc1-dev-3 → 0.16.0-rc1-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.
|
@@ -64,6 +64,45 @@ export type GetAnalysisURIResponse = {
|
|
|
64
64
|
uri?: string
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
+
export type NodeGPUInfo = {
|
|
68
|
+
clusterName?: string
|
|
69
|
+
nodeName?: string
|
|
70
|
+
gpuProduct?: string
|
|
71
|
+
gpuMemory?: string
|
|
72
|
+
gpuCount?: number
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export type ListNodeGPUInfoRequest = {
|
|
76
|
+
cluster?: string
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export type ListNodeGPUInfoResponse = {
|
|
80
|
+
items?: NodeGPUInfo[]
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export type ModelGPUInfo = {
|
|
84
|
+
accessModelName?: string
|
|
85
|
+
lwsName?: string
|
|
86
|
+
namespace?: string
|
|
87
|
+
cluster?: string
|
|
88
|
+
nodes?: ModelNodeGPU[]
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export type ModelNodeGPU = {
|
|
92
|
+
nodeName?: string
|
|
93
|
+
gpuProduct?: string
|
|
94
|
+
gpuMemory?: string
|
|
95
|
+
gpuCount?: number
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export type ListModelGPUInfoRequest = {
|
|
99
|
+
accessModelName?: string
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export type ListModelGPUInfoResponse = {
|
|
103
|
+
items?: ModelGPUInfo[]
|
|
104
|
+
}
|
|
105
|
+
|
|
67
106
|
export class CoreService {
|
|
68
107
|
static AdminListCluster(req: ListClusterRequest, initReq?: fm.InitReq): Promise<ListClusterResponse> {
|
|
69
108
|
return fm.fetchReq<ListClusterRequest, ListClusterResponse>(`/apis/admin.hydra.io/v1alpha1/clusters?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
@@ -80,4 +119,10 @@ export class CoreService {
|
|
|
80
119
|
static GetAnalysisURI(req: GetAnalysisURIRequest, initReq?: fm.InitReq): Promise<GetAnalysisURIResponse> {
|
|
81
120
|
return fm.fetchReq<GetAnalysisURIRequest, GetAnalysisURIResponse>(`/apis/admin.hydra.io/v1alpha1/analysis-uri?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
82
121
|
}
|
|
122
|
+
static ListNodeGPUInfo(req: ListNodeGPUInfoRequest, initReq?: fm.InitReq): Promise<ListNodeGPUInfoResponse> {
|
|
123
|
+
return fm.fetchReq<ListNodeGPUInfoRequest, ListNodeGPUInfoResponse>(`/apis/admin.hydra.io/v1alpha1/node-gpu-info?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
124
|
+
}
|
|
125
|
+
static ListModelGPUInfo(req: ListModelGPUInfoRequest, initReq?: fm.InitReq): Promise<ListModelGPUInfoResponse> {
|
|
126
|
+
return fm.fetchReq<ListModelGPUInfoRequest, ListModelGPUInfoResponse>(`/apis/admin.hydra.io/v1alpha1/model-gpu-info?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
127
|
+
}
|
|
83
128
|
}
|
|
@@ -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
|
+
}
|
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
|
-
}
|