Skip to content

Commit d31921a

Browse files
[NLP] Support the different mask tokens used by NLP models for Fill Mask (#2178)
Adds the specification for the new mask token field added in elastic/elasticsearch#97453, which enables users and Kibana to see the mask token for a particular model
1 parent 7994247 commit d31921a

File tree

3 files changed

+38
-19
lines changed

3 files changed

+38
-19
lines changed

output/schema/schema.json

Lines changed: 31 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/typescript/types.ts

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/ml/_types/inference.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,12 @@ export class NerInferenceOptions {
265265

266266
/** Fill mask inference options */
267267
export class FillMaskInferenceOptions {
268+
/** The string/token which will be removed from incoming documents and replaced with the inference prediction(s).
269+
* In a response, this field contains the mask token for the specified model/tokenizer. Each model and tokenizer
270+
* has a predefined mask token which cannot be changed. Thus, it is recommended not to set this value in requests.
271+
* However, if this field is present in a request, its value must match the predefined value for that model/tokenizer,
272+
* otherwise the request will fail. */
273+
mask_token?: string
268274
/** Specifies the number of top class predictions to return. Defaults to 0. */
269275
num_top_classes?: integer
270276
/** The tokenization options to update when inferring */

0 commit comments

Comments
 (0)