@daocloud-proto/hydra 0.11.0-rc1-dev-rc1 → 0.15.0

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.
Files changed (33) hide show
  1. package/admin-api/core/v1alpha1/core.pb.ts +59 -0
  2. package/admin-api/guardrails/v1alpha1/guardrails.pb.ts +180 -0
  3. package/admin-api/maas/v1alpha1/maas.pb.ts +3 -0
  4. package/admin-api/model/v1alpha1/model.pb.ts +51 -0
  5. package/admin-api/model/v1alpha1/model_weights_volume.pb.ts +96 -0
  6. package/admin-api/storage/v1alpha1/filesstorage.pb.ts +261 -0
  7. package/admin-api/workspace-quota/v1alpha1/workspace_quota.pb.ts +61 -0
  8. package/common/common.pb.ts +55 -0
  9. package/common/errorcode.ts +2 -2
  10. package/management-api/agent/v1alpha1/event.pb.ts +59 -0
  11. package/management-api/agent/v1alpha1/server_registration.pb.ts +33 -0
  12. package/management-api/agent/v1alpha1/sftp_user.pb.ts +39 -0
  13. package/management-api/apikey/v1alpha1/apikey.pb.ts +70 -2
  14. package/management-api/cluster/v1alpha1/cluster.pb.ts +28 -0
  15. package/management-api/core/v1alpha1/image.pb.ts +174 -0
  16. package/management-api/core/v1alpha1/management.pb.ts +17 -0
  17. package/management-api/core/v1alpha1/permissions.pb.ts +33 -11
  18. package/management-api/dataset/v1alpha1/dataset.pb.ts +110 -0
  19. package/management-api/dataset/v1alpha1/dataset_volume.pb.ts +107 -0
  20. package/management-api/event/v1alpha1/event.pb.ts +38 -0
  21. package/management-api/finetune/v1alpha1/common.pb.ts +14 -0
  22. package/management-api/finetune/v1alpha1/evaljob.pb.ts +130 -0
  23. package/management-api/finetune/v1alpha1/export_job.pb.ts +89 -0
  24. package/management-api/finetune/v1alpha1/finetuneconfig.pb.ts +239 -0
  25. package/management-api/finetune/v1alpha1/finetunejob.pb.ts +107 -0
  26. package/management-api/model/v1alpha1/model.pb.ts +114 -9
  27. package/management-api/model/v1alpha1/model_weights_volume.pb.ts +101 -0
  28. package/management-api/model_serving/v1alpha1/model_serving.pb.ts +103 -5
  29. package/management-api/model_type/v1alpha1/model_type.pb.ts +20 -0
  30. package/management-api/queue/v1alpha1/queue.pb.ts +121 -0
  31. package/management-api/storage/v1alpha1/filesstorage.pb.ts +495 -0
  32. package/management-api/workspace/v1alpha1/workspace.pb.ts +8 -0
  33. package/package.json +1 -1
@@ -6,7 +6,29 @@
6
6
 
7
7
  import * as HydraCommonCommon from "../../../common/common.pb"
8
8
  import * as fm from "../../../fetch.pb"
9
+ import * as GoogleProtobufEmpty from "../../../google/protobuf/empty.pb"
9
10
  import * as HydraManagement_apiWorkspaceV1alpha1Workspace from "../../../management-api/workspace/v1alpha1/workspace.pb"
11
+
12
+ export enum AdminPermission {
13
+ MODEL_GET = "MODEL_GET",
14
+ MODEL_CREATE = "MODEL_CREATE",
15
+ MODEL_UPDATE = "MODEL_UPDATE",
16
+ MODEL_DELETE = "MODEL_DELETE",
17
+ MAAS_MODEL_GET = "MAAS_MODEL_GET",
18
+ MAAS_MODEL_CREATE = "MAAS_MODEL_CREATE",
19
+ MAAS_MODEL_UPDATE = "MAAS_MODEL_UPDATE",
20
+ CLUSTER_GET = "CLUSTER_GET",
21
+ FILES_STORAGE_GET = "FILES_STORAGE_GET",
22
+ FILES_STORAGE_CREATE = "FILES_STORAGE_CREATE",
23
+ FILES_STORAGE_UPDATE = "FILES_STORAGE_UPDATE",
24
+ FILES_STORAGE_DELETE = "FILES_STORAGE_DELETE",
25
+ }
26
+
27
+ export enum ExportModule {
28
+ EXPORT_MODULE_UNSPECIFIED = "EXPORT_MODULE_UNSPECIFIED",
29
+ EXPORT_MODULE_AI_AUDIT_LOG = "EXPORT_MODULE_AI_AUDIT_LOG",
30
+ }
31
+
10
32
  export type ListClusterRequest = {
11
33
  page?: HydraCommonCommon.Pagination
12
34
  }
@@ -16,8 +38,45 @@ export type ListClusterResponse = {
16
38
  page?: HydraCommonCommon.Pagination
17
39
  }
18
40
 
41
+ export type ConstantsResponse = {
42
+ defaultFilesStorageCapacity?: string
43
+ defaultMountPath?: string
44
+ }
45
+
46
+ export type ListPlatformRolePermissionsForCurrentUserResponse = {
47
+ permissions?: AdminPermission[]
48
+ }
49
+
50
+ export type GetExportURIRequest = {
51
+ module?: ExportModule
52
+ }
53
+
54
+ export type GetExportURIResponse = {
55
+ uri?: string
56
+ method?: string
57
+ }
58
+
59
+ export type GetAnalysisURIRequest = {
60
+ }
61
+
62
+ export type GetAnalysisURIResponse = {
63
+ uri?: string
64
+ }
65
+
19
66
  export class CoreService {
20
67
  static AdminListCluster(req: ListClusterRequest, initReq?: fm.InitReq): Promise<ListClusterResponse> {
21
68
  return fm.fetchReq<ListClusterRequest, ListClusterResponse>(`/apis/admin.hydra.io/v1alpha1/clusters?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
22
69
  }
70
+ static AdminListConstants(req: GoogleProtobufEmpty.Empty, initReq?: fm.InitReq): Promise<ConstantsResponse> {
71
+ return fm.fetchReq<GoogleProtobufEmpty.Empty, ConstantsResponse>(`/apis/admin.hydra.io/v1alpha1/constants?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
72
+ }
73
+ static ListPlatformRolePermissionsForCurrentUser(req: GoogleProtobufEmpty.Empty, initReq?: fm.InitReq): Promise<ListPlatformRolePermissionsForCurrentUserResponse> {
74
+ return fm.fetchReq<GoogleProtobufEmpty.Empty, ListPlatformRolePermissionsForCurrentUserResponse>(`/apis/admin.hydra.io/v1alpha1/permissions?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
75
+ }
76
+ static GetExportURI(req: GetExportURIRequest, initReq?: fm.InitReq): Promise<GetExportURIResponse> {
77
+ return fm.fetchReq<GetExportURIRequest, GetExportURIResponse>(`/apis/admin.hydra.io/v1alpha1/export-uri?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
78
+ }
79
+ static GetAnalysisURI(req: GetAnalysisURIRequest, initReq?: fm.InitReq): Promise<GetAnalysisURIResponse> {
80
+ return fm.fetchReq<GetAnalysisURIRequest, GetAnalysisURIResponse>(`/apis/admin.hydra.io/v1alpha1/analysis-uri?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
81
+ }
23
82
  }
@@ -0,0 +1,180 @@
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 GoogleApiHttpbody from "../../../google/api/httpbody.pb"
10
+ import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
11
+
12
+ export enum BlockStrategy {
13
+ BLOCK_STRATEGY_UNSPECIFIED = "BLOCK_STRATEGY_UNSPECIFIED",
14
+ BLOCK_STRATEGY_ANY = "BLOCK_STRATEGY_ANY",
15
+ BLOCK_STRATEGY_ALL = "BLOCK_STRATEGY_ALL",
16
+ }
17
+
18
+ export enum MatchStrategy {
19
+ MATCH_STRATEGY_UNSPECIFIED = "MATCH_STRATEGY_UNSPECIFIED",
20
+ MATCH_STRATEGY_ANY = "MATCH_STRATEGY_ANY",
21
+ MATCH_STRATEGY_ALL = "MATCH_STRATEGY_ALL",
22
+ }
23
+
24
+ export enum PluginAction {
25
+ PLUGIN_ACTION_UNSPECIFIED = "PLUGIN_ACTION_UNSPECIFIED",
26
+ PLUGIN_ACTION_BLOCK = "PLUGIN_ACTION_BLOCK",
27
+ PLUGIN_ACTION_LOG = "PLUGIN_ACTION_LOG",
28
+ PLUGIN_ACTION_REPLACE_RANDOM = "PLUGIN_ACTION_REPLACE_RANDOM",
29
+ PLUGIN_ACTION_REPLACE_MASK = "PLUGIN_ACTION_REPLACE_MASK",
30
+ }
31
+
32
+ export enum GuardrailsPlugin {
33
+ GUARDRAILS_PLUGIN_UNSPECIFIED = "GUARDRAILS_PLUGIN_UNSPECIFIED",
34
+ GUARDRAILS_PLUGIN_CONTAINS = "GUARDRAILS_PLUGIN_CONTAINS",
35
+ GUARDRAILS_PLUGIN_REGEX = "GUARDRAILS_PLUGIN_REGEX",
36
+ GUARDRAILS_PLUGIN_JSON_SCHEMA = "GUARDRAILS_PLUGIN_JSON_SCHEMA",
37
+ GUARDRAILS_PLUGIN_JWT = "GUARDRAILS_PLUGIN_JWT",
38
+ GUARDRAILS_PLUGIN_MODEL_WHITELIST = "GUARDRAILS_PLUGIN_MODEL_WHITELIST",
39
+ }
40
+
41
+ export enum GuardrailsLevel {
42
+ GUARDRAILS_LEVEL_UNSPECIFIED = "GUARDRAILS_LEVEL_UNSPECIFIED",
43
+ GUARDRAILS_LEVEL_HIGH = "GUARDRAILS_LEVEL_HIGH",
44
+ GUARDRAILS_LEVEL_MEDIUM = "GUARDRAILS_LEVEL_MEDIUM",
45
+ GUARDRAILS_LEVEL_LOW = "GUARDRAILS_LEVEL_LOW",
46
+ }
47
+
48
+ export enum ExportType {
49
+ EXPORT_TYPE_UNSPECIFIED = "EXPORT_TYPE_UNSPECIFIED",
50
+ EXPORT_TYPE_CSV = "EXPORT_TYPE_CSV",
51
+ EXPORT_TYPE_EXCEL = "EXPORT_TYPE_EXCEL",
52
+ }
53
+
54
+ export type AIGuardrailsConfig = {
55
+ blockStrategy?: BlockStrategy
56
+ denyMessage?: string
57
+ regexMatch?: RegexMatchPlugin
58
+ contains?: ContainsPlugin
59
+ jsonSchema?: JsonSchemaPlugin
60
+ jwt?: JWTPlugin
61
+ modelWhitelist?: ModelWhitelistPlugin
62
+ cluster?: string
63
+ creationTime?: GoogleProtobufTimestamp.Timestamp
64
+ updateTime?: GoogleProtobufTimestamp.Timestamp
65
+ }
66
+
67
+ export type RegexMatchPlugin = {
68
+ enabled?: boolean
69
+ patterns?: string[]
70
+ matchStrategy?: MatchStrategy
71
+ action?: PluginAction
72
+ responses?: string[]
73
+ }
74
+
75
+ export type ContainsPlugin = {
76
+ enabled?: boolean
77
+ words?: string[]
78
+ matchStrategy?: MatchStrategy
79
+ action?: PluginAction
80
+ responses?: string[]
81
+ }
82
+
83
+ export type JsonSchemaPlugin = {
84
+ enabled?: boolean
85
+ action?: PluginAction
86
+ }
87
+
88
+ export type JWTPlugin = {
89
+ enabled?: boolean
90
+ action?: PluginAction
91
+ headerKey?: string
92
+ required?: boolean
93
+ }
94
+
95
+ export type ModelWhitelistPlugin = {
96
+ enabled?: boolean
97
+ models?: string[]
98
+ isBlocklist?: boolean
99
+ action?: PluginAction
100
+ }
101
+
102
+ export type GetAIGuardrailsConfigRequest = {
103
+ cluster?: string
104
+ }
105
+
106
+ export type UpdateAIGuardrailsConfigRequest = {
107
+ cluster?: string
108
+ config?: AIGuardrailsConfig
109
+ }
110
+
111
+ export type ListAIGuardrailsConfigRequest = {
112
+ page?: HydraCommonCommon.Pagination
113
+ cluster?: string
114
+ }
115
+
116
+ export type ListAIGuardrailsConfigResponse = {
117
+ items?: AIGuardrailsConfig[]
118
+ page?: HydraCommonCommon.Pagination
119
+ }
120
+
121
+ export type QueryAIAuditLogRequest = {
122
+ page?: HydraCommonCommon.Pagination
123
+ startTime?: GoogleProtobufTimestamp.Timestamp
124
+ endTime?: GoogleProtobufTimestamp.Timestamp
125
+ clusterName?: string
126
+ operation?: PluginAction
127
+ pluginId?: GuardrailsPlugin
128
+ level?: GuardrailsLevel
129
+ routeName?: string
130
+ }
131
+
132
+ export type AIAuditLog = {
133
+ timestamp?: GoogleProtobufTimestamp.Timestamp
134
+ duration?: string
135
+ clusterName?: string
136
+ routeName?: string
137
+ operation?: PluginAction
138
+ pluginId?: GuardrailsPlugin
139
+ level?: GuardrailsLevel
140
+ reason?: string
141
+ denyMessage?: string
142
+ matchSource?: string
143
+ functionName?: string
144
+ functionArgs?: string
145
+ matchRule?: string
146
+ }
147
+
148
+ export type QueryAIAuditLogResponse = {
149
+ items?: AIAuditLog[]
150
+ page?: HydraCommonCommon.Pagination
151
+ }
152
+
153
+ export type ExportAIAuditLogRequest = {
154
+ startTime?: GoogleProtobufTimestamp.Timestamp
155
+ endTime?: GoogleProtobufTimestamp.Timestamp
156
+ clusterName?: string
157
+ operation?: PluginAction
158
+ pluginId?: GuardrailsPlugin
159
+ level?: GuardrailsLevel
160
+ exportType?: ExportType
161
+ routeName?: string
162
+ }
163
+
164
+ export class AIGuardrailsService {
165
+ static GetAIGuardrailsConfig(req: GetAIGuardrailsConfigRequest, initReq?: fm.InitReq): Promise<AIGuardrailsConfig> {
166
+ return fm.fetchReq<GetAIGuardrailsConfigRequest, AIGuardrailsConfig>(`/apis/admin.hydra.io/v1alpha1/ai-guardrails/${req["cluster"]}?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
167
+ }
168
+ static ListAIGuardrailsConfig(req: ListAIGuardrailsConfigRequest, initReq?: fm.InitReq): Promise<ListAIGuardrailsConfigResponse> {
169
+ return fm.fetchReq<ListAIGuardrailsConfigRequest, ListAIGuardrailsConfigResponse>(`/apis/admin.hydra.io/v1alpha1/ai-guardrails?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
170
+ }
171
+ static UpdateAIGuardrailsConfig(req: UpdateAIGuardrailsConfigRequest, initReq?: fm.InitReq): Promise<AIGuardrailsConfig> {
172
+ return fm.fetchReq<UpdateAIGuardrailsConfigRequest, AIGuardrailsConfig>(`/apis/admin.hydra.io/v1alpha1/ai-guardrails`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
173
+ }
174
+ static QueryAIAuditLog(req: QueryAIAuditLogRequest, initReq?: fm.InitReq): Promise<QueryAIAuditLogResponse> {
175
+ return fm.fetchReq<QueryAIAuditLogRequest, QueryAIAuditLogResponse>(`/apis/admin.hydra.io/v1alpha1/ai-guardrails-logs?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
176
+ }
177
+ static ExportAIAuditLog(req: ExportAIAuditLogRequest, initReq?: fm.InitReq): Promise<GoogleApiHttpbody.HttpBody> {
178
+ return fm.fetchReq<ExportAIAuditLogRequest, GoogleApiHttpbody.HttpBody>(`/apis/admin.hydra.io/v1alpha1/ai-guardrails-logs/export?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
179
+ }
180
+ }
@@ -40,6 +40,7 @@ export type CreateMAASModelRequest = {
40
40
  cluster?: string
41
41
  ratelimitConfig?: RatelimitConfig
42
42
  loadBalanceConfig?: LoadBalanceConfig
43
+ tokenWeight?: string
43
44
  }
44
45
 
45
46
  export type MAASModel = {
@@ -51,6 +52,7 @@ export type MAASModel = {
51
52
  creationTimestamp?: GoogleProtobufTimestamp.Timestamp
52
53
  gatewayStatus?: MAASModelGatewayStatus
53
54
  enabled?: boolean
55
+ tokenWeight?: string
54
56
  }
55
57
 
56
58
  export type LoadBalanceConfig = {
@@ -101,6 +103,7 @@ export type UpdateMAASModelRequest = {
101
103
  ratelimitConfig?: RatelimitConfig
102
104
  loadBalanceConfig?: LoadBalanceConfig
103
105
  upstreamModels?: UpstreamModel[]
106
+ tokenWeight?: string
104
107
  }
105
108
 
106
109
  export type UpdateMAASModelStatusRequest = {
@@ -6,6 +6,7 @@
6
6
 
7
7
  import * as HydraCommonCommon from "../../../common/common.pb"
8
8
  import * as fm from "../../../fetch.pb"
9
+ import * as GoogleProtobufEmpty from "../../../google/protobuf/empty.pb"
9
10
  import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
10
11
  import * as HydraManagement_apiModelV1alpha1Model from "../../../management-api/model/v1alpha1/model.pb"
11
12
 
@@ -121,11 +122,41 @@ export type AddDeployTemplatesRequest = {
121
122
  deployTemplates?: HydraManagement_apiModelV1alpha1Model.DeployTemplate[]
122
123
  }
123
124
 
125
+ export type ModelTemplate = {
126
+ templateId?: string
127
+ modelId?: string
128
+ workspace?: number
129
+ spec?: HydraManagement_apiModelV1alpha1Model.DeployTemplate
130
+ creationTimestamp?: GoogleProtobufTimestamp.Timestamp
131
+ updateTimestamp?: GoogleProtobufTimestamp.Timestamp
132
+ }
133
+
124
134
  export type UpdateDeployTemplatesRequest = {
125
135
  modelId?: string
126
136
  deployTemplates?: HydraManagement_apiModelV1alpha1Model.DeployTemplate[]
127
137
  }
128
138
 
139
+ export type ModelServingRef = {
140
+ id?: string
141
+ name?: string
142
+ cluster?: string
143
+ namespace?: string
144
+ }
145
+
146
+ export type WorkspaceModelServingGroup = {
147
+ workspaceId?: string
148
+ items?: ModelServingRef[]
149
+ workspaceName?: string
150
+ }
151
+
152
+ export type ListModelServingsByModelRequest = {
153
+ modelId?: string
154
+ }
155
+
156
+ export type ListModelServingsByModelResponse = {
157
+ items?: WorkspaceModelServingGroup[]
158
+ }
159
+
129
160
  export class AdminModelManagement {
130
161
  static CreateModel(req: CreateModelRequest, initReq?: fm.InitReq): Promise<Model> {
131
162
  return fm.fetchReq<CreateModelRequest, Model>(`/apis/admin.hydra.io/v1alpha1/models`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
@@ -160,4 +191,24 @@ export class AdminModelManagement {
160
191
  static UpdateDeployTemplates(req: UpdateDeployTemplatesRequest, initReq?: fm.InitReq): Promise<Model> {
161
192
  return fm.fetchReq<UpdateDeployTemplatesRequest, Model>(`/apis/admin.hydra.io/v1alpha1/models/${req["modelId"]}/deploy_templates`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
162
193
  }
194
+ static ListModelServingsByModel(req: ListModelServingsByModelRequest, initReq?: fm.InitReq): Promise<ListModelServingsByModelResponse> {
195
+ return fm.fetchReq<ListModelServingsByModelRequest, ListModelServingsByModelResponse>(`/apis/admin.hydra.io/v1alpha1/models/${req["modelId"]}/servings?${fm.renderURLSearchParams(req, ["modelId"])}`, {...initReq, method: "GET"})
196
+ }
197
+ }
198
+ export class AdminModelTemplateManagement {
199
+ static CreateModelTemplate(req: HydraManagement_apiModelV1alpha1Model.CreateModelTemplateRequest, initReq?: fm.InitReq): Promise<HydraManagement_apiModelV1alpha1Model.ModelTemplate> {
200
+ return fm.fetchReq<HydraManagement_apiModelV1alpha1Model.CreateModelTemplateRequest, HydraManagement_apiModelV1alpha1Model.ModelTemplate>(`/apis/admin.hydra.io/v1alpha1/models/${req["modelId"]}/model-templates`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
201
+ }
202
+ static GetModelTemplate(req: HydraManagement_apiModelV1alpha1Model.GetModelTemplateRequest, initReq?: fm.InitReq): Promise<HydraManagement_apiModelV1alpha1Model.ModelTemplate> {
203
+ return fm.fetchReq<HydraManagement_apiModelV1alpha1Model.GetModelTemplateRequest, HydraManagement_apiModelV1alpha1Model.ModelTemplate>(`/apis/admin.hydra.io/v1alpha1/models/${req["modelId"]}/model-templates/${req["templateId"]}?${fm.renderURLSearchParams(req, ["modelId", "templateId"])}`, {...initReq, method: "GET"})
204
+ }
205
+ static UpdateModelTemplate(req: HydraManagement_apiModelV1alpha1Model.UpdateModelTemplateRequest, initReq?: fm.InitReq): Promise<HydraManagement_apiModelV1alpha1Model.ModelTemplate> {
206
+ return fm.fetchReq<HydraManagement_apiModelV1alpha1Model.UpdateModelTemplateRequest, HydraManagement_apiModelV1alpha1Model.ModelTemplate>(`/apis/admin.hydra.io/v1alpha1/models/${req["modelId"]}/model-templates/${req["templateId"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
207
+ }
208
+ static DeleteModelTemplate(req: HydraManagement_apiModelV1alpha1Model.DeleteModelTemplateRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
209
+ return fm.fetchReq<HydraManagement_apiModelV1alpha1Model.DeleteModelTemplateRequest, GoogleProtobufEmpty.Empty>(`/apis/admin.hydra.io/v1alpha1/models/${req["modelId"]}/model-templates/${req["templateId"]}`, {...initReq, method: "DELETE"})
210
+ }
211
+ static ListModelTemplates(req: HydraManagement_apiModelV1alpha1Model.ListModelTemplatesRequest, initReq?: fm.InitReq): Promise<HydraManagement_apiModelV1alpha1Model.ListModelTemplatesResponse> {
212
+ return fm.fetchReq<HydraManagement_apiModelV1alpha1Model.ListModelTemplatesRequest, HydraManagement_apiModelV1alpha1Model.ListModelTemplatesResponse>(`/apis/admin.hydra.io/v1alpha1/models/${req["modelId"]}/model-templates?${fm.renderURLSearchParams(req, ["modelId"])}`, {...initReq, method: "GET"})
213
+ }
163
214
  }
@@ -0,0 +1,96 @@
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
+ referenced?: boolean
29
+ }
30
+
31
+ export type CreateModelWeightsVolumeRequest = {
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 UpdateModelWeightsVolumeRequest = {
43
+ id?: string
44
+ modelId?: string
45
+ clusterName?: string
46
+ modelTag?: string
47
+ storageSource?: StorageSourceType
48
+ storageRef?: string
49
+ subPath?: string
50
+ mountPath?: string
51
+ }
52
+
53
+ export type SingleModelWeightsVolumeRequest = {
54
+ id?: string
55
+ modelId?: string
56
+ }
57
+
58
+ export type ListModelWeightsVolumesRequest = {
59
+ modelId?: string
60
+ page?: HydraCommonCommon.Pagination
61
+ clusterName?: string
62
+ }
63
+
64
+ export type ListModelWeightsVolumesResponse = {
65
+ items?: ModelWeightsVolume[]
66
+ page?: HydraCommonCommon.Pagination
67
+ }
68
+
69
+ export type GetStorageSourceRequest = {
70
+ modelId?: string
71
+ }
72
+
73
+ export type GetStorageSourceResponse = {
74
+ sources?: {[key: string]: number}
75
+ }
76
+
77
+ export class AdminModelWeightsVolumeManagement {
78
+ static CreateModelWeightsVolume(req: CreateModelWeightsVolumeRequest, initReq?: fm.InitReq): Promise<ModelWeightsVolume> {
79
+ return fm.fetchReq<CreateModelWeightsVolumeRequest, ModelWeightsVolume>(`/apis/admin.hydra.io/v1alpha1/models/${req["modelId"]}/weights`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
80
+ }
81
+ static UpdateModelWeightsVolume(req: UpdateModelWeightsVolumeRequest, initReq?: fm.InitReq): Promise<ModelWeightsVolume> {
82
+ 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)})
83
+ }
84
+ static DeleteModelWeightsVolume(req: SingleModelWeightsVolumeRequest, initReq?: fm.InitReq): Promise<ModelWeightsVolume> {
85
+ return fm.fetchReq<SingleModelWeightsVolumeRequest, ModelWeightsVolume>(`/apis/admin.hydra.io/v1alpha1/models/${req["modelId"]}/weights/${req["id"]}`, {...initReq, method: "DELETE"})
86
+ }
87
+ static GetModelWeightsVolume(req: SingleModelWeightsVolumeRequest, initReq?: fm.InitReq): Promise<ModelWeightsVolume> {
88
+ return fm.fetchReq<SingleModelWeightsVolumeRequest, ModelWeightsVolume>(`/apis/admin.hydra.io/v1alpha1/models/${req["modelId"]}/weights/${req["id"]}?${fm.renderURLSearchParams(req, ["modelId", "id"])}`, {...initReq, method: "GET"})
89
+ }
90
+ static ListModelWeightsVolumes(req: ListModelWeightsVolumesRequest, initReq?: fm.InitReq): Promise<ListModelWeightsVolumesResponse> {
91
+ return fm.fetchReq<ListModelWeightsVolumesRequest, ListModelWeightsVolumesResponse>(`/apis/admin.hydra.io/v1alpha1/models/${req["modelId"]}/weights?${fm.renderURLSearchParams(req, ["modelId"])}`, {...initReq, method: "GET"})
92
+ }
93
+ static GetStorageSource(req: GetStorageSourceRequest, initReq?: fm.InitReq): Promise<GetStorageSourceResponse> {
94
+ return fm.fetchReq<GetStorageSourceRequest, GetStorageSourceResponse>(`/apis/admin.hydra.io/v1alpha1/models/${req["modelId"]}/weights:storage-source?${fm.renderURLSearchParams(req, ["modelId"])}`, {...initReq, method: "GET"})
95
+ }
96
+ }