Skip to content

Commit 784d8cf

Browse files
[Backport 8.13] Add prefix strings to PUT model request (#2450)
Follow up to #2363 where prefix_strings option was added to TrainedModelConfig (cherry picked from commit f6ec736) Co-authored-by: David Kyle <david.kyle@elastic.co>
1 parent 38c0b12 commit 784d8cf

File tree

5 files changed

+40
-12
lines changed

5 files changed

+40
-12
lines changed

output/openapi/elasticsearch-serverless-openapi.json

+4-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/schema.json

+24-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/typescript/types.ts

+3-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/ml/_types/TrainedModel.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -429,9 +429,9 @@ export class TrainedModelPrefixStrings {
429429
/**
430430
* String prepended to input at ingest
431431
*/
432-
ingest: string
432+
ingest?: string
433433
/**
434434
* String prepended to input at search
435435
*/
436-
search: string
436+
search?: string
437437
}

specification/ml/put_trained_model/MlPutTrainedModelRequest.ts

+7
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import { RequestBase } from '@_types/Base'
2222
import { Id } from '@_types/common'
2323
import { long } from '@_types/Numeric'
2424
import { Definition, Input } from './types'
25+
import { TrainedModelPrefixStrings } from '../_types/TrainedModel'
2526
import { TrainedModelType } from '../_types/TrainedModel'
2627
import { InferenceConfigCreateContainer } from '@ml/_types/inference'
2728

@@ -102,5 +103,11 @@ export interface Request extends RequestBase {
102103
* An array of tags to organize the model.
103104
*/
104105
tags?: string[]
106+
/**
107+
* Optional prefix strings applied at inference
108+
* @availability stack since=8.12.0
109+
* @availability serverless
110+
*/
111+
prefix_strings?: TrainedModelPrefixStrings
105112
}
106113
}

0 commit comments

Comments
 (0)