Modifies a model service.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
polardb:ModifyModelService |
update |
*All Resource
|
None | None |
Request syntax
POST HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| GwClusterId |
string |
Yes |
The gateway instance ID. You can obtain this ID from the GwClusterId parameter returned by the CreateGateway operation. |
pg-xxxxxxxxxx |
| Name |
string |
Yes |
The model service name. This parameter and GwClusterId are used together to locate the model service to be modified. You must specify the current service name of the target service instead of a new service name. This operation does not support renaming the service by using this parameter. |
testName |
| ModelCategory |
string |
Yes |
The model category. |
text |
| Protocol |
string |
Yes |
The protocol type. Valid values:
|
openai |
| BaseUrl |
string |
No |
The address of the upstream service. |
https://dashscope.aliyuncs.com/compatible-mode/v1 |
| ApiKey |
string |
No |
The API key of the model service. |
6c4b1f0317cd4fd7a5b446d3503d** |
| InputCostPointsPerMillion |
string |
No |
The number of input points. |
10 |
| OutputCostPointsPerMillion |
string |
No |
The number of output points. |
10 |
| RequestCostPoints |
string |
No |
The number of requests. |
10 |
| ModelServiceId |
string |
Yes |
The model service ID. You can obtain this ID from the ModelServiceId parameter returned by the CreateModelService operation. This parameter, along with GwClusterId and Name, is used to locate the model service to be modified. |
ms-xxxxxx |
| RegionId |
string |
No |
The region ID. |
cn-beijing |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. |
6A2EE5B4-CC9F-46E1-A747-E43BC9****** |
| ModelServiceId |
string |
The model service ID. |
ms-xxxxxx |
| Status |
string |
The status of the model service. |
Enable |
Examples
Success response
JSON format
{
"RequestId": "6A2EE5B4-CC9F-46E1-A747-E43BC9******",
"ModelServiceId": "ms-xxxxxx",
"Status": "Enable"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | QueryModelServiceFailed | Failed to query existing ModelService: Model service not found: custinsName='pg-2ze30g6g851ii0d09', name='test-svc-modified' | The general query failed. (Legacy code retained.) |
| 400 | ModelService.NotFound | Model service not found for GwClusterId='{gw_cluster_id}' and Name='{name}'. Verify that the service exists by calling DescribeModelServices. | The target model service with GwClusterId {gw_cluster_id} and Name {name} cannot be found. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.