Skip to content

Commit e6d8af5

Browse files
dolarugithub-actions[bot]
authored andcommitted
Add missing scores parameter in MLPutTrainedModelVocabularyRequest (#2321)
This adds the missing scores parameter that was introduced in v8.9.0. [Docs](https://www.elastic.co/guide/en/elasticsearch/reference/8.9/put-trained-model-vocabulary.html#ml-put-trained-model-vocabulary-request-body) say: > (Optional, array) Vocabulary value scores used by sentence-piece tokenization. Must have the same length as vocabulary. Required for unigram sentence-piece tokenized models like XLMRoberta and T5. (cherry picked from commit e279583)
1 parent 3b09f9d commit e6d8af5

File tree

3 files changed

+32
-1
lines changed

3 files changed

+32
-1
lines changed

output/schema/schema.json

Lines changed: 23 additions & 1 deletion
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/put_trained_model_vocabulary/MlPutTrainedModelVocabularyRequest.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
import { RequestBase } from '@_types/Base'
2121
import { Id } from '@_types/common'
22+
import { double } from '@_types/Numeric'
2223

2324
/**
2425
* Creates a trained model vocabulary.
@@ -48,5 +49,12 @@ export interface Request extends RequestBase {
4849
* @availability serverless
4950
*/
5051
merges?: string[]
52+
53+
/**
54+
* The optional vocabulary value scores if required by the tokenizer.
55+
* @availability stack since=8.9.0
56+
* @availability serverless
57+
*/
58+
scores?: double[]
5159
}
5260
}

0 commit comments

Comments
 (0)