跳到主要内容

离线更新(QuickStart)

离线更新模型部署(QuickStart)信息。
PUT
https://api.alayanew.com/api/serverless-infer/v1/deployment/{serviceId}
Authorizations
AuthorizationsStringHeaderRequired

用户可通过已获取Serverless API Key做验证,例如:plain Credential=[YOUR_AK],Signature=[YOUR_SK]。

Path Parameters
serviceIdStringRequired

服务ID。

Body
application/json
vksIdStringRequired

弹性容器集群(VKS)ID。

namespaceStringRequired

弹性容器集群(VKS)NameSpace。

nameStringRequired

服务名称。

servedNameList<String>Required

模型内部标识。

modelIdStringRequired

模型ID。

backendStringRequired

后端服务, vllm/sglang。

backendVersionStringRequired

后端服务版本。

backendArgsStringRequired

后端服务参数。

resourceObjectRequired

Response
状态码:application/json
codeInt

code是一种常见的返回值形式,表示查询操作的执行结果。

0是成功标识,表示操作成功完成。
dataObject

msgString

code返回值为-1时,返回异常信息。

curl --location --request PUT 'https://api.alayanew.com/api/serverless-infer/v1/deployment/38fbfc3d-6a88-4c35-b8b6-9efc83949d47' 
     --header 'Authorization:plain Credential=YOUR_AK,Signature=YOUR_SK' 
     --header 'Content-Type: application/json' 
     --data '{
        "vksId": "vcacb50arkk4",
        "namespace": "default",
        "name": "testsglang",
        "servedName": [
                "testsglang"
            ],
        "modelId": "c486cdee-c316-4fc1-9f75-0d1741940f27",
        "backend": "sglang",
        "backendVersion": "0.4.6",
        "backendArgs": [],
        "resource": {
                "workers": 2,
                "cpu": 4,
                "gpu": {
                    "count": 1,
                    "gpuType": "nvidia.com/gpu-l40s"
                },
                "mem": 10
            }
    }'
{
    "code": 0,
    "data": {   
    },
    "msg": "string, "
}