Skip to content

Commit

Permalink
Add prefix_strings option to PUT model request (#2449)
Browse files Browse the repository at this point in the history
Follow up to #2363 where prefix_strings option was added to TrainedModelConfig

(cherry picked from commit f6ec736)
  • Loading branch information
davidkyle authored and github-actions[bot] committed Mar 13, 2024
1 parent b8c1640 commit d47bb8d
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 12 deletions.
9 changes: 4 additions & 5 deletions output/openapi/elasticsearch-serverless-openapi.json

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

27 changes: 24 additions & 3 deletions output/schema/schema.json

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

5 changes: 3 additions & 2 deletions output/typescript/types.ts

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

4 changes: 2 additions & 2 deletions specification/ml/_types/TrainedModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -429,9 +429,9 @@ export class TrainedModelPrefixStrings {
/**
* String prepended to input at ingest
*/
ingest: string
ingest?: string
/**
* String prepended to input at search
*/
search: string
search?: string
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { RequestBase } from '@_types/Base'
import { Id } from '@_types/common'
import { long } from '@_types/Numeric'
import { Definition, Input } from './types'
import { TrainedModelPrefixStrings } from '../_types/TrainedModel'
import { TrainedModelType } from '../_types/TrainedModel'
import { InferenceConfigCreateContainer } from '@ml/_types/inference'

Expand Down Expand Up @@ -102,5 +103,11 @@ export interface Request extends RequestBase {
* An array of tags to organize the model.
*/
tags?: string[]
/**
* Optional prefix strings applied at inference
* @availability stack since=8.12.0
* @availability serverless
*/
prefix_strings?: TrainedModelPrefixStrings
}
}

0 comments on commit d47bb8d

Please sign in to comment.