@daocloud-proto/hydra 0.15.0-dev-7 → 0.16.0-dev-1
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
|
+
}
|
|
@@ -24,6 +24,12 @@ export enum ModelSupportFeature {
|
|
|
24
24
|
TOOLS = "TOOLS",
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
export enum SkuDiscountScheduleType {
|
|
28
|
+
SKU_DISCOUNT_SCHEDULE_TYPE_UNSPECIFIED = "SKU_DISCOUNT_SCHEDULE_TYPE_UNSPECIFIED",
|
|
29
|
+
SKU_DISCOUNT_SCHEDULE_TYPE_ABSOLUTE = "SKU_DISCOUNT_SCHEDULE_TYPE_ABSOLUTE",
|
|
30
|
+
SKU_DISCOUNT_SCHEDULE_TYPE_DAILY = "SKU_DISCOUNT_SCHEDULE_TYPE_DAILY",
|
|
31
|
+
}
|
|
32
|
+
|
|
27
33
|
export enum PublicModelConfigRateLimitLimitedBy {
|
|
28
34
|
LIMITED_BY_UNSPECIFIED = "LIMITED_BY_UNSPECIFIED",
|
|
29
35
|
USER_ID = "USER_ID",
|
|
@@ -37,11 +43,31 @@ export enum DeployTemplateInferenceRuntime {
|
|
|
37
43
|
IMAGE_GEN = "IMAGE_GEN",
|
|
38
44
|
}
|
|
39
45
|
|
|
46
|
+
export type ModelPriceDiscountInfo = {
|
|
47
|
+
discountRate?: number
|
|
48
|
+
discountName?: string
|
|
49
|
+
schedule?: ModelPriceDiscountSchedule
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export type ModelPriceDiscountSchedule = {
|
|
53
|
+
discountRuleId?: string
|
|
54
|
+
type?: SkuDiscountScheduleType
|
|
55
|
+
effectiveStartAt?: string
|
|
56
|
+
effectiveEndAt?: string
|
|
57
|
+
dailyStartMinute?: number
|
|
58
|
+
dailyEndMinute?: number
|
|
59
|
+
timezone?: string
|
|
60
|
+
}
|
|
61
|
+
|
|
40
62
|
export type ModelPrice = {
|
|
41
63
|
inputPerKTokens?: string
|
|
42
64
|
outputPerKTokens?: string
|
|
43
65
|
perImage?: string
|
|
44
66
|
cachedPerKTokens?: string
|
|
67
|
+
inputDiscountInfo?: ModelPriceDiscountInfo
|
|
68
|
+
outputDiscountInfo?: ModelPriceDiscountInfo
|
|
69
|
+
perImageDiscountInfo?: ModelPriceDiscountInfo
|
|
70
|
+
cachedDiscountInfo?: ModelPriceDiscountInfo
|
|
45
71
|
}
|
|
46
72
|
|
|
47
73
|
export type Model = {
|
|
@@ -211,6 +211,7 @@ export type ModelServing = {
|
|
|
211
211
|
modelAvatar?: string
|
|
212
212
|
regionName?: HydraCommonCommon.I18nName
|
|
213
213
|
modelSupportFeature?: HydraManagement_apiModelV1alpha1Model.ModelSupportFeature[]
|
|
214
|
+
enableMetrics?: boolean
|
|
214
215
|
}
|
|
215
216
|
|
|
216
217
|
|
|
@@ -237,6 +238,7 @@ export type ModelServing = {
|
|
|
237
238
|
preflight?: PreflightConfig
|
|
238
239
|
configMapMounts?: ConfigMapMountConfig[]
|
|
239
240
|
healthCheck?: HealthCheckConfig
|
|
241
|
+
enableMetrics?: boolean
|
|
240
242
|
}
|
|
241
243
|
|
|
242
244
|
export type WSModelServing = BaseWSModelServing
|
|
@@ -336,6 +338,19 @@ export type DeployDetectCondition = {
|
|
|
336
338
|
message?: string
|
|
337
339
|
}
|
|
338
340
|
|
|
341
|
+
export type ListBuiltinEnvVarsRequest = {
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
export type BuiltinEnvVar = {
|
|
345
|
+
name?: string
|
|
346
|
+
description?: HydraCommonCommon.I18nName
|
|
347
|
+
example?: string
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
export type ListBuiltinEnvVarsResponse = {
|
|
351
|
+
items?: BuiltinEnvVar[]
|
|
352
|
+
}
|
|
353
|
+
|
|
339
354
|
export class ModelServingManagement {
|
|
340
355
|
static CreateModelServing(req: CreateModelServingRequest, initReq?: fm.InitReq): Promise<ModelServing> {
|
|
341
356
|
return fm.fetchReq<CreateModelServingRequest, ModelServing>(`/apis/hydra.io/v1alpha1/model-serving`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
@@ -378,4 +393,7 @@ export class WSModelServingManagement {
|
|
|
378
393
|
static DoModelWSServingAction(req: WSModelServingActionRequest, initReq?: fm.InitReq): Promise<WSModelServing> {
|
|
379
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)})
|
|
380
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
|
+
}
|
|
381
399
|
}
|