Skip to content

Commit

Permalink
Add prefix_string config option for ML models (#2363)
Browse files Browse the repository at this point in the history
The prefix_strings option was added to support the E5 model in
elastic/elasticsearch#102089
  • Loading branch information
davidkyle authored Jan 2, 2024
1 parent 0270837 commit 05c39a9
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 19 deletions.
20 changes: 20 additions & 0 deletions output/openapi/elasticsearch-serverless-openapi.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

83 changes: 64 additions & 19 deletions output/schema/schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions output/typescript/types.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions specification/ml/_types/TrainedModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ export class TrainedModelConfig {
metadata?: TrainedModelConfigMetadata
model_size_bytes?: ByteSize
location?: TrainedModelLocation
prefix_strings?: TrainedModelPrefixStrings
}

export class TrainedModelConfigInput {
Expand Down Expand Up @@ -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
}

0 comments on commit 05c39a9

Please sign in to comment.