@daocloud-proto/hydra 0.17.0-rc1-dev-5 → 0.17.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.
|
@@ -108,12 +108,17 @@ export type MAASCapabilityRoute = {
|
|
|
108
108
|
upstreams?: MAASCapabilityUpstream[]
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
+
export type MAASCapabilityConfig = {
|
|
112
|
+
path?: string
|
|
113
|
+
compatibility?: string
|
|
114
|
+
}
|
|
115
|
+
|
|
111
116
|
export type MAASCapabilityUpstream = {
|
|
112
117
|
modelId?: string
|
|
113
118
|
baseUrl?: string
|
|
114
|
-
capabilityPaths?: {[key: string]: string}
|
|
115
119
|
apiKey?: string
|
|
116
120
|
status?: MAASBackendStatus
|
|
121
|
+
capabilityConfigs?: {[key: string]: MAASCapabilityConfig}
|
|
117
122
|
}
|
|
118
123
|
|
|
119
124
|
export type UpstreamModel = {
|
|
@@ -41,7 +41,7 @@ export type CreateModelRequest = {
|
|
|
41
41
|
hidden?: boolean
|
|
42
42
|
providerName?: HydraCommonCommon.I18nName
|
|
43
43
|
parameterSize?: number
|
|
44
|
-
contextLength?: HydraManagement_apiModelV1alpha1Model.
|
|
44
|
+
contextLength?: HydraManagement_apiModelV1alpha1Model.ContextLength
|
|
45
45
|
operationTags?: HydraManagement_apiModelV1alpha1Model.ModelOperationTag[]
|
|
46
46
|
}
|
|
47
47
|
|
|
@@ -63,7 +63,7 @@ export type Model = {
|
|
|
63
63
|
servingSpec?: HydraManagement_apiModelV1alpha1Model.ModelServingSpec
|
|
64
64
|
hidden?: boolean
|
|
65
65
|
parameterSize?: number
|
|
66
|
-
contextLength?: HydraManagement_apiModelV1alpha1Model.
|
|
66
|
+
contextLength?: HydraManagement_apiModelV1alpha1Model.ContextLength
|
|
67
67
|
operationTags?: HydraManagement_apiModelV1alpha1Model.ModelOperationTag[]
|
|
68
68
|
publishTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
69
69
|
}
|
|
@@ -83,7 +83,7 @@ export type UpdateModelRequest = {
|
|
|
83
83
|
servingSpec?: HydraManagement_apiModelV1alpha1Model.ModelServingSpec
|
|
84
84
|
hidden?: boolean
|
|
85
85
|
parameterSize?: number
|
|
86
|
-
contextLength?: HydraManagement_apiModelV1alpha1Model.
|
|
86
|
+
contextLength?: HydraManagement_apiModelV1alpha1Model.ContextLength
|
|
87
87
|
operationTags?: HydraManagement_apiModelV1alpha1Model.ModelOperationTag[]
|
|
88
88
|
}
|
|
89
89
|
|
|
@@ -34,12 +34,26 @@ export enum ModelSupportFeature {
|
|
|
34
34
|
TEXT_TO_AUDIO = "TEXT_TO_AUDIO",
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
export enum ContextLength {
|
|
38
|
+
CONTEXT_LENGTH_UNSPECIFIED = "CONTEXT_LENGTH_UNSPECIFIED",
|
|
39
|
+
CTX_4K = "CTX_4K",
|
|
40
|
+
CTX_8K = "CTX_8K",
|
|
41
|
+
CTX_16K = "CTX_16K",
|
|
42
|
+
CTX_32K = "CTX_32K",
|
|
43
|
+
CTX_64K = "CTX_64K",
|
|
44
|
+
CTX_128K = "CTX_128K",
|
|
45
|
+
CTX_256K = "CTX_256K",
|
|
46
|
+
CTX_512K = "CTX_512K",
|
|
47
|
+
CTX_1M = "CTX_1M",
|
|
48
|
+
}
|
|
49
|
+
|
|
37
50
|
export enum ContextLengthRange {
|
|
38
51
|
CONTEXT_LENGTH_RANGE_UNSPECIFIED = "CONTEXT_LENGTH_RANGE_UNSPECIFIED",
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
52
|
+
CTX_LE_4K = "CTX_LE_4K",
|
|
53
|
+
CTX_4K_16K = "CTX_4K_16K",
|
|
54
|
+
CTX_16K_64K = "CTX_16K_64K",
|
|
55
|
+
CTX_64K_128K = "CTX_64K_128K",
|
|
56
|
+
CTX_GE_128K = "CTX_GE_128K",
|
|
43
57
|
}
|
|
44
58
|
|
|
45
59
|
export enum ModelOperationTag {
|
|
@@ -131,7 +145,7 @@ export type Model = {
|
|
|
131
145
|
modelDeploymentsExists?: boolean
|
|
132
146
|
visible?: string
|
|
133
147
|
parameterSize?: number
|
|
134
|
-
contextLength?:
|
|
148
|
+
contextLength?: ContextLength
|
|
135
149
|
operationTags?: ModelOperationTag[]
|
|
136
150
|
publishTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
137
151
|
}
|
|
@@ -237,7 +251,7 @@ export type WSModel = {
|
|
|
237
251
|
visible?: string
|
|
238
252
|
tokenWeight?: string
|
|
239
253
|
parameterSize?: number
|
|
240
|
-
contextLength?:
|
|
254
|
+
contextLength?: ContextLength
|
|
241
255
|
operationTags?: ModelOperationTag[]
|
|
242
256
|
publishTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
243
257
|
}
|
|
@@ -316,6 +330,60 @@ export type GetModelSupportFeatureConfigResponse = {
|
|
|
316
330
|
config?: ModelSupportFeatureConfig
|
|
317
331
|
}
|
|
318
332
|
|
|
333
|
+
export type ListModelCapabilityCompatibilitiesRequest = {
|
|
334
|
+
capability?: string
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
export type ModelCapabilityCompatibilityField = {
|
|
338
|
+
name?: string
|
|
339
|
+
displayName?: string
|
|
340
|
+
valueType?: string
|
|
341
|
+
required?: boolean
|
|
342
|
+
defaultValue?: string
|
|
343
|
+
allowedValues?: string[]
|
|
344
|
+
description?: string
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
export type ModelCapabilityCompatibilityAction = {
|
|
348
|
+
kind?: string
|
|
349
|
+
field?: string
|
|
350
|
+
targetField?: string
|
|
351
|
+
fixedValue?: string
|
|
352
|
+
description?: string
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
export type ModelCapabilityCompatibility = {
|
|
356
|
+
compatibility?: string
|
|
357
|
+
displayName?: string
|
|
358
|
+
description?: string
|
|
359
|
+
requestFields?: ModelCapabilityCompatibilityField[]
|
|
360
|
+
requestActions?: ModelCapabilityCompatibilityAction[]
|
|
361
|
+
responseMode?: string
|
|
362
|
+
responseActions?: ModelCapabilityCompatibilityAction[]
|
|
363
|
+
errorPolicy?: string
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
export type ListModelCapabilityCompatibilitiesResponse = {
|
|
367
|
+
capability?: string
|
|
368
|
+
items?: ModelCapabilityCompatibility[]
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
export type ListModelCapabilityCompatibilityOptionsRequest = {
|
|
372
|
+
capability?: string
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
export type ModelCapabilityCompatibilityOption = {
|
|
376
|
+
compatibility?: string
|
|
377
|
+
displayName?: string
|
|
378
|
+
description?: string
|
|
379
|
+
requestFields?: ModelCapabilityCompatibilityField[]
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
export type ListModelCapabilityCompatibilityOptionsResponse = {
|
|
383
|
+
capability?: string
|
|
384
|
+
items?: ModelCapabilityCompatibilityOption[]
|
|
385
|
+
}
|
|
386
|
+
|
|
319
387
|
export class ModelManagement {
|
|
320
388
|
static GetModel(req: SingleModelRequest, initReq?: fm.InitReq): Promise<Model> {
|
|
321
389
|
return fm.fetchReq<SingleModelRequest, Model>(`/apis/hydra.io/v1alpha1/models/${req["modelId"]}?${fm.renderURLSearchParams(req, ["modelId"])}`, {...initReq, method: "GET"})
|
|
@@ -368,4 +436,10 @@ export class ModelConfigManagement {
|
|
|
368
436
|
static GetModelSupportFeatureConfig(req: GetModelSupportFeatureConfigRequest, initReq?: fm.InitReq): Promise<GetModelSupportFeatureConfigResponse> {
|
|
369
437
|
return fm.fetchReq<GetModelSupportFeatureConfigRequest, GetModelSupportFeatureConfigResponse>(`/apis/hydra.io/v1alpha1/model-support-features/config?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
370
438
|
}
|
|
439
|
+
static ListModelCapabilityCompatibilities(req: ListModelCapabilityCompatibilitiesRequest, initReq?: fm.InitReq): Promise<ListModelCapabilityCompatibilitiesResponse> {
|
|
440
|
+
return fm.fetchReq<ListModelCapabilityCompatibilitiesRequest, ListModelCapabilityCompatibilitiesResponse>(`/apis/hydra.io/v1alpha1/model-capabilities/${req["capability"]}/compatibilities?${fm.renderURLSearchParams(req, ["capability"])}`, {...initReq, method: "GET"})
|
|
441
|
+
}
|
|
442
|
+
static ListModelCapabilityCompatibilityOptions(req: ListModelCapabilityCompatibilityOptionsRequest, initReq?: fm.InitReq): Promise<ListModelCapabilityCompatibilityOptionsResponse> {
|
|
443
|
+
return fm.fetchReq<ListModelCapabilityCompatibilityOptionsRequest, ListModelCapabilityCompatibilityOptionsResponse>(`/apis/hydra.io/v1alpha1/model-capabilities/${req["capability"]}/compatibility-options?${fm.renderURLSearchParams(req, ["capability"])}`, {...initReq, method: "GET"})
|
|
444
|
+
}
|
|
371
445
|
}
|