Create a trained model vocabulary
Added in 8.0.0
This API is supported only for natural language processing (NLP) models.
The vocabulary is stored in the index as described in inference_config.*.vocabulary
of the trained model definition.
Path parameters
-
model_id
string Required The unique identifier of the trained model.
Body
Required
-
vocabulary
array[string] Required The model vocabulary, which must not be empty.
-
merges
array[string] The optional model merges if required by the tokenizer.
-
scores
array[number] The optional vocabulary value scores if required by the tokenizer.
PUT
/_ml/trained_models/{model_id}/vocabulary
curl \
--request PUT http://api.example.com/_ml/trained_models/{model_id}/vocabulary \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '{"vocabulary":["string"],"merges":["string"],"scores":[42.0]}'