* Add agent framework documentation Signed-off-by: Fanit Kolchina <[email protected]> * Add hidden model and API updates Signed-off-by: Fanit Kolchina <[email protected]> * Vale error Signed-off-by: Fanit Kolchina <[email protected]> * Updated field names Signed-off-by: Fanit Kolchina <[email protected]> * Add updating credentials Signed-off-by: Fanit Kolchina <[email protected]> * Added tools table Signed-off-by: Fanit Kolchina <[email protected]> * Add OpenSearch forum thread for OS Assistant Signed-off-by: Fanit Kolchina <[email protected]> * Add tech review for conv search Signed-off-by: Fanit Kolchina <[email protected]> * Fix links Signed-off-by: Fanit Kolchina <[email protected]> * Add tools Signed-off-by: Fanit Kolchina <[email protected]> * Add links to tools Signed-off-by: Fanit Kolchina <[email protected]> * More info about tools Signed-off-by: Fanit Kolchina <[email protected]> * Tool parameters Signed-off-by: Fanit Kolchina <[email protected]> * Update cat-index-tool.md Signed-off-by: kolchfa-aws <[email protected]> * Parameter clarification Signed-off-by: Fanit Kolchina <[email protected]> * Tech review feedback Signed-off-by: Fanit Kolchina <[email protected]> * Typo fix Signed-off-by: Fanit Kolchina <[email protected]> * More tech review feedback: RAG tool Signed-off-by: Fanit Kolchina <[email protected]> * Tech review feedback: memory APis Signed-off-by: Fanit Kolchina <[email protected]> * Update _ml-commons-plugin/agents-tools/index.md Co-authored-by: Melissa Vagi <[email protected]> Signed-off-by: kolchfa-aws <[email protected]> * Update _ml-commons-plugin/agents-tools/tools/neural-sparse-tool.md Co-authored-by: Melissa Vagi <[email protected]> Signed-off-by: kolchfa-aws <[email protected]> * Update _ml-commons-plugin/agents-tools/tools/neural-sparse-tool.md Co-authored-by: Melissa Vagi <[email protected]> Signed-off-by: kolchfa-aws <[email protected]> * Update _ml-commons-plugin/agents-tools/tools/neural-sparse-tool.md Co-authored-by: Melissa Vagi <[email protected]> Signed-off-by: kolchfa-aws <[email protected]> * Update _ml-commons-plugin/opensearch-assistant.md Co-authored-by: Melissa Vagi <[email protected]> Signed-off-by: kolchfa-aws <[email protected]> * Update _ml-commons-plugin/agents-tools/tools/ppl-tool.md Co-authored-by: Melissa Vagi <[email protected]> Signed-off-by: kolchfa-aws <[email protected]> * Apply suggestions from code review Co-authored-by: Melissa Vagi <[email protected]> Signed-off-by: kolchfa-aws <[email protected]> * Separated search and get APIs and add conversational flow agent Signed-off-by: Fanit Kolchina <[email protected]> * More parameters for PPL tool Signed-off-by: Fanit Kolchina <[email protected]> * Added more parameters Signed-off-by: Fanit Kolchina <[email protected]> * Tech review feedback: PPL tool Signed-off-by: Fanit Kolchina <[email protected]> * Apply suggestions from code review Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: kolchfa-aws <[email protected]> * Rename to automating configurations Signed-off-by: Fanit Kolchina <[email protected]> * Editorial comments on the new text Signed-off-by: Fanit Kolchina <[email protected]> * Add parameter to PPl tool Signed-off-by: Fanit Kolchina <[email protected]> * Changed link to configurations Signed-off-by: Fanit Kolchina <[email protected]> * Rate limiter feedback and added warning Signed-off-by: Fanit Kolchina <[email protected]> --------- Signed-off-by: Fanit Kolchina <[email protected]> Signed-off-by: kolchfa-aws <[email protected]> Co-authored-by: Melissa Vagi <[email protected]> Co-authored-by: Nathan Bower <[email protected]>
3.9 KiB
3.9 KiB
layout, title, parent, grand_parent, nav_order
| layout | title | parent | grand_parent | nav_order |
|---|---|---|---|---|
| default | Update model | Model APIs | ML Commons APIs | 40 |
Update a model
Introduced 2.12 {: .label .label-purple }
Updates a model based on the model_ID.
For information about user access for this API, see Model access control considerations.
Path and HTTP methods
PUT /_plugins/_ml/models/<model_id>
Request fields
The following table lists the updatable fields. Not all request fields are applicable to all models. To determine whether the field is applicable to your model type, see Register Model API.
| Field | Data type | Description |
|---|---|---|
connector |
Object | Contains specifications for a connector for a model hosted on a third-party platform. For more information, see Creating a connector for a specific model. For information about the updatable fields within a connector, see Update Connector API request fields. |
connector_id |
Optional | The connector ID of a standalone connector for a model hosted on a third-party platform. For more information, see Standalone connector. To update a standalone connector, you must undeploy the model, update the connector, and then redeploy the model. |
description |
String | The model description. |
is_enabled |
Boolean | Specifies whether the model is enabled. Disabling the model makes it unavailable for Predict API requests, regardless of the model's deployment status. Default is true. |
model_config |
Object | The model's configuration, including the model_type, embedding_dimension, and framework_type. all_config is an optional JSON string that contains all model configurations. For more information, see The model_config object. |
model_group_id |
String | The model group ID of the model group to which to register this model. |
name |
String | The model name. |
rate_limiter |
Object | Limits the number of times any user can call the Predict API on the model. For more information, see Rate limiting inference calls. |
rate_limiter.limit |
Integer | The maximum number of times any user can call the Predict API on the model per unit of time. By default, there is no limit on the number of Predict API calls. Once you set a limit, you cannot reset it to no limit. As an alternative, you can specify a high limit value and a small time unit, for example, 1 request per nanosecond. |
rate_limiter.unit |
String | The unit of time for the rate limiter. Valid values are DAYS, HOURS, MICROSECONDS, MILLISECONDS, MINUTES, NANOSECONDS, and SECONDS. |
Example request: Disabling a model
PUT /_plugins/_ml/models/MzcIJX8BA7mbufL6DOwl
{
"is_enabled": false
}
{% include copy-curl.html %}
Example request: Rate limiting inference calls for a model
The following request limits the number of times you can call the Predict API on the model to 4 Predict API calls per minute:
PUT /_plugins/_ml/models/T_S-cY0BKCJ3ot9qr0aP
{
"rate_limiter": {
"limit": "4",
"unit": "MINUTES"
}
}
{% include copy-curl.html %}
Example response
{
"_index": ".plugins-ml-model",
"_id": "MzcIJX8BA7mbufL6DOwl",
"_version": 10,
"result": "updated",
"_shards": {
"total": 1,
"successful": 1,
"failed": 0
},
"_seq_no": 48,
"_primary_term": 4
}