Authorization: Bearer ********************{
"id": "2073953895251447808",
"modelName": "doubao-seed-2-0-lite-260428-fb1", // 模型名称(唯一标识)
"operatorName": "火山引擎", // 运营商名称
"modelType": 100, // 模型类型(100=推理模型,600+视频模型)
"baseUrl": "https://ark.cn-beijing.volces.com/api/v3/chat/completions", // 模型服务地址
"httpMethod": "POST", // 请求方式 GET/POST
"headMsg": { // 请求头JSON结构
"Content-Type": "application/json",
"Authorization": "Bearer ark-xxx"
},
"isPrivate": 1, // 是否私有化:0-私有 1-公共
"enabled": 1, // 是否启用:0-停用 1-启用
"isChatModel": 0, // 是否为对话模型:0-否 1-是
"callMode": 0, // 调用模式:0-同步 1-异步 2-流式
"apiKey": "ark-xxx", // 调用凭证/密钥
"form": [ // 动态表单配置(实际对接按照给我传递的参数再决定逻辑)
{
"key": "model",
"type": "string",
"label": "模型名称",
"required": true,
"defaultValue": "doubao-seed-2-0-lite-260428"
},
{
"key": "messages.0.content.0.text",
"type": "string",
"label": "用户提示词",
"required": true,
"fieldConstraint": {
"maxLength": 100000
}
}
],
"responseMapping": { // 返回映射(其中content,total_tokens,prompt_tokens,completion_tokens前端定死)
"content": "choices.0.message.content", //必填
"total_tokens": "usage.total_tokens", //非必填
"prompt_tokens": "usage.prompt_tokens", //非必填
"completion_tokens": "usage.completion_tokens" //非必填
},
"queryConfig": { // 异步调用 查询/回调配置
"url": "",
"method": "GET",
"task_id": "id",
"status_path": "status",
"status_values": {
"succeeded": "succeeded",
"failed": "failed"
},
"interval_seconds": 2
},
"streamConfig": { // 流式调用 流式输出配置
"events": [],
"parser": "",
"enabled": false
},
"specialParams": { // 请求特殊参数(首尾帧等,其中first_frame,last_frame前端定死)
"first_frame": "content.0.image_url.url",
"last_frame": "content.1.image_url.url"
},
"maxConcurrency": 100, // 最大并发数(默认10)
"timeoutSeconds": 1200, // 请求超时时间(秒,默认600)
"retryTimes": 3 // 失败重试次数(默认3)
}curl --location --request PUT 'http://127.0.0.1:3004/model/updateModel' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"id": "2073953895251447808",
"modelName": "doubao-seed-2-0-lite-260428-fb1", // 模型名称(唯一标识)
"operatorName": "火山引擎", // 运营商名称
"modelType": 100, // 模型类型(100=推理模型,600+视频模型)
"baseUrl": "https://ark.cn-beijing.volces.com/api/v3/chat/completions", // 模型服务地址
"httpMethod": "POST", // 请求方式 GET/POST
"headMsg": { // 请求头JSON结构
"Content-Type": "application/json",
"Authorization": "Bearer ark-xxx"
},
"isPrivate": 1, // 是否私有化:0-私有 1-公共
"enabled": 1, // 是否启用:0-停用 1-启用
"isChatModel": 0, // 是否为对话模型:0-否 1-是
"callMode": 0, // 调用模式:0-同步 1-异步 2-流式
"apiKey": "ark-xxx", // 调用凭证/密钥
"form": [ // 动态表单配置(实际对接按照给我传递的参数再决定逻辑)
{
"key": "model",
"type": "string",
"label": "模型名称",
"required": true,
"defaultValue": "doubao-seed-2-0-lite-260428"
},
{
"key": "messages.0.content.0.text",
"type": "string",
"label": "用户提示词",
"required": true,
"fieldConstraint": {
"maxLength": 100000
}
}
],
"responseMapping": { // 返回映射(其中content,total_tokens,prompt_tokens,completion_tokens前端定死)
"content": "choices.0.message.content", //必填
"total_tokens": "usage.total_tokens", //非必填
"prompt_tokens": "usage.prompt_tokens", //非必填
"completion_tokens": "usage.completion_tokens" //非必填
},
"queryConfig": { // 异步调用 查询/回调配置
"url": "",
"method": "GET",
"task_id": "id",
"status_path": "status",
"status_values": {
"succeeded": "succeeded",
"failed": "failed"
},
"interval_seconds": 2
},
"streamConfig": { // 流式调用 流式输出配置
"events": [],
"parser": "",
"enabled": false
},
"specialParams": { // 请求特殊参数(首尾帧等,其中first_frame,last_frame前端定死)
"first_frame": "content.0.image_url.url",
"last_frame": "content.1.image_url.url"
},
"maxConcurrency": 100, // 最大并发数(默认10)
"timeoutSeconds": 1200, // 请求超时时间(秒,默认600)
"retryTimes": 3 // 失败重试次数(默认3)
}'{
"code": 0,
"message": "OK",
"data": null
}