From 9d163aa3a6cfb46f4e4e5af9048194b29d15faea Mon Sep 17 00:00:00 2001 From: David Kyle Date: Fri, 8 Dec 2023 08:45:11 +0000 Subject: [PATCH] Add prefix string option --- .../elasticsearch-serverless-openapi.json | 20 +++++ output/schema/schema.json | 83 ++++++++++++++----- output/typescript/types.ts | 6 ++ specification/ml/_types/TrainedModel.ts | 12 +++ 4 files changed, 102 insertions(+), 19 deletions(-) diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index cb216e8cd2..9a528c6237 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -53197,6 +53197,9 @@ }, "location": { "$ref": "#/components/schemas/ml._types:TrainedModelLocation" + }, + "prefix_strings": { + "$ref": "#/components/schemas/ml._types:TrainedModelPrefixStrings" } }, "required": [ @@ -53669,6 +53672,23 @@ "name" ] }, + "ml._types:TrainedModelPrefixStrings": { + "type": "object", + "properties": { + "ingest": { + "description": "String prepended to input at ingest", + "type": "string" + }, + "search": { + "description": "String prepended to input at search", + "type": "string" + } + }, + "required": [ + "ingest", + "search" + ] + }, "ml._types:TrainedModelStats": { "type": "object", "properties": { diff --git a/output/schema/schema.json b/output/schema/schema.json index af1ae3d844..f17b67f712 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -139455,7 +139455,7 @@ "name": "DeploymentAllocationState", "namespace": "ml._types" }, - "specLocation": "ml/_types/TrainedModel.ts#L288-L301" + "specLocation": "ml/_types/TrainedModel.ts#L289-L302" }, { "kind": "enum", @@ -139477,7 +139477,7 @@ "name": "DeploymentAssignmentState", "namespace": "ml._types" }, - "specLocation": "ml/_types/TrainedModel.ts#L303-L308" + "specLocation": "ml/_types/TrainedModel.ts#L304-L309" }, { "kind": "enum", @@ -139499,7 +139499,7 @@ "name": "DeploymentState", "namespace": "ml._types" }, - "specLocation": "ml/_types/TrainedModel.ts#L273-L286" + "specLocation": "ml/_types/TrainedModel.ts#L274-L287" }, { "kind": "interface", @@ -140264,7 +140264,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L216-L230" + "specLocation": "ml/_types/TrainedModel.ts#L217-L231" }, { "kind": "interface", @@ -143557,7 +143557,7 @@ "name": "RoutingState", "namespace": "ml._types" }, - "specLocation": "ml/_types/TrainedModel.ts#L350-L371" + "specLocation": "ml/_types/TrainedModel.ts#L351-L372" }, { "kind": "enum", @@ -144220,7 +144220,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L232-L239" + "specLocation": "ml/_types/TrainedModel.ts#L233-L240" }, { "kind": "interface", @@ -144257,7 +144257,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L241-L246" + "specLocation": "ml/_types/TrainedModel.ts#L242-L247" }, { "kind": "interface", @@ -144303,7 +144303,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L248-L255" + "specLocation": "ml/_types/TrainedModel.ts#L249-L256" }, { "kind": "interface", @@ -144382,7 +144382,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L402-L417" + "specLocation": "ml/_types/TrainedModel.ts#L403-L418" }, { "kind": "interface", @@ -144440,7 +144440,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L373-L391" + "specLocation": "ml/_types/TrainedModel.ts#L374-L392" }, { "kind": "interface", @@ -144552,7 +144552,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L315-L348" + "specLocation": "ml/_types/TrainedModel.ts#L316-L349" }, { "kind": "interface", @@ -144787,9 +144787,20 @@ "namespace": "ml._types" } } + }, + { + "name": "prefix_strings", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "TrainedModelPrefixStrings", + "namespace": "ml._types" + } + } } ], - "specLocation": "ml/_types/TrainedModel.ts#L165-L199" + "specLocation": "ml/_types/TrainedModel.ts#L165-L200" }, { "kind": "interface", @@ -144814,7 +144825,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L201-L204" + "specLocation": "ml/_types/TrainedModel.ts#L202-L205" }, { "kind": "interface", @@ -144891,7 +144902,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L206-L214" + "specLocation": "ml/_types/TrainedModel.ts#L207-L215" }, { "kind": "interface", @@ -144937,7 +144948,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L393-L400" + "specLocation": "ml/_types/TrainedModel.ts#L394-L401" }, { "kind": "interface", @@ -145546,7 +145557,7 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L419-L421" + "specLocation": "ml/_types/TrainedModel.ts#L420-L422" }, { "kind": "interface", @@ -145567,7 +145578,41 @@ } } ], - "specLocation": "ml/_types/TrainedModel.ts#L423-L425" + "specLocation": "ml/_types/TrainedModel.ts#L424-L426" + }, + { + "kind": "interface", + "name": { + "name": "TrainedModelPrefixStrings", + "namespace": "ml._types" + }, + "properties": [ + { + "description": "String prepended to input at ingest", + "name": "ingest", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "description": "String prepended to input at search", + "name": "search", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "ml/_types/TrainedModel.ts#L428-L437" }, { "kind": "interface", @@ -145714,7 +145759,7 @@ "name": "TrainedModelType", "namespace": "ml._types" }, - "specLocation": "ml/_types/TrainedModel.ts#L257-L271" + "specLocation": "ml/_types/TrainedModel.ts#L258-L272" }, { "kind": "enum", @@ -145730,7 +145775,7 @@ "name": "TrainingPriority", "namespace": "ml._types" }, - "specLocation": "ml/_types/TrainedModel.ts#L310-L313" + "specLocation": "ml/_types/TrainedModel.ts#L311-L314" }, { "kind": "interface", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 4bc6d799f3..6f06c8771d 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -13233,6 +13233,7 @@ export interface MlTrainedModelConfig { metadata?: MlTrainedModelConfigMetadata model_size_bytes?: ByteSize location?: MlTrainedModelLocation + prefix_strings?: MlTrainedModelPrefixStrings } export interface MlTrainedModelConfigInput { @@ -13320,6 +13321,11 @@ export interface MlTrainedModelLocationIndex { name: IndexName } +export interface MlTrainedModelPrefixStrings { + ingest: string + search: string +} + export interface MlTrainedModelSizeStats { model_size_bytes: ByteSize required_native_memory_bytes: integer diff --git a/specification/ml/_types/TrainedModel.ts b/specification/ml/_types/TrainedModel.ts index 0cb14c14b1..21262132ff 100644 --- a/specification/ml/_types/TrainedModel.ts +++ b/specification/ml/_types/TrainedModel.ts @@ -196,6 +196,7 @@ export class TrainedModelConfig { metadata?: TrainedModelConfigMetadata model_size_bytes?: ByteSize location?: TrainedModelLocation + prefix_strings?: TrainedModelPrefixStrings } export class TrainedModelConfigInput { @@ -423,3 +424,14 @@ export class TrainedModelLocation { export class TrainedModelLocationIndex { name: IndexName } + +export class TrainedModelPrefixStrings { + /** + * String prepended to input at ingest + */ + ingest: string + /** + * String prepended to input at search + */ + search: string +}