Modifies the details and status of a model.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
searchengine:ModifyModel |
update |
*Instance
|
None | None |
Request syntax
PUT /openapi/ha3/instances/{instanceId}/models/{modelName} HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| instanceId |
string |
Yes |
The instance ID. |
ha-cn-pl32rf0**** |
| modelName |
string |
Yes |
The model name. |
test |
| dryRun |
string |
No |
Specifies whether to perform only a check. The default value is false. |
true |
| body |
object |
No |
The request body. |
|
| content |
object |
No |
The model details. |
|
| method |
string |
No |
The HTTP method to access the model service. Valid values are PUT and POST. |
POST |
| modelType |
string |
No |
The model type.
|
text_embedding |
| dimension |
integer |
No |
The dimension of the model. |
128 |
| request |
object |
No |
The model request body. |
|
| header |
object |
No |
The HTTP header to access the model service. |
|
| Authorization |
string |
No |
The authentication information. Format: Bearer access_token |
Bearer OS-v0********6vvs |
| Content-Type |
string |
No |
The content type of the HTTP request. |
application/json |
| parameters |
object |
No |
Specifies parameters that are different for the build and search phases. |
|
| build |
object |
No |
The parameters for the index building phase. |
|
| input_type |
string |
No |
The input type. |
query |
| search |
object |
No |
The parameters for the query phase. |
|
| input_type |
string |
No |
The input type. |
document |
| requestBody |
string |
No |
The template string for the request body. |
{\"input\": [\"%{input}\"], \"input_type\": \"%{input_type}\"} |
| urlParams |
object |
No |
The parameters in the URL. Some model services require parameters to be passed in the URL. |
|
| build |
object |
No |
The parameters for the index building phase. |
key: value |
| search |
object |
No |
The parameters for the query phase. |
key: value |
| response |
object |
No |
The JSONPath expression used to parse the result. |
|
| embeddings |
string |
No |
The JSONPath expression used to parse the embeddings from the result. |
$.result.embeddings[*].embedding |
| url |
string |
No |
The endpoint of the model service. |
http://***.platform-cn-shanghai.opensearch.aliyuncs.com/v3/openapi/workspaces/default/text-embedding/ops-text-embedding-001 |
| status |
string |
No |
The model status.
|
ok |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response schema. |
||
| requestId |
string |
The request ID. |
D39EE0F1-D7EF-5F46-B781-6BF4185308B0 |
Examples
Success response
JSON format
{
"requestId": "D39EE0F1-D7EF-5F46-B781-6BF4185308B0"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.