feat(image): 以插件声明统一图片参数、尺寸选择与定价合同 (#760)
* feat(image): 图片参数 - 统一插件声明配置与生成合同 * docs(image): 图片参数 - 说明声明合同与验证边界 * fix(plugins): 图片声明 - 保留内联素材支持并同步制品文档 * fix(image): 参数合同 - 对齐审批意图和尺寸预检调用方 * fix(image): 调用链 - 保留公开意图并接通独立分辨率 * fix(image): 图片参数 - 补齐分辨率接线与目录价格投影
This commit is contained in:
@@ -70,6 +70,10 @@
|
||||
|
||||
Agnes 官方图像端点,同步返回。文生图与图生图共用 /v1/images/generations:不传 image 为文生图,传 image 为图生图或多图合成。size 必填,取 1K/2K/3K/4K 档位或 WxH 精确尺寸;画面比例走独立的 ratio 字段。参考图放在 extra_body.image,支持公共 HTTPS URL 或 Data URI Base64。顶层 response_format 是官方明确列出的错误写法,输出格式只能声明在 extra_body.response_format。该端点不接受 n,单次请求固定返回一张图片,需要多张时由上层拆分为多个任务。
|
||||
|
||||
## 动态图片参数
|
||||
|
||||
`contributes.providers[].imageParameters` 是渠道模型、前台模型与生成界面共用的参数合同。`name` 为稳定身份,`type`、`values`、`min/max/step`、`default` 描述输入;`models` 限定适用上游模型,`enabled` 为初始启用状态。只有 `pricing: true` 的启用字段允许作为价格条件;其他参数仍参与生成。渠道可收窄范围,绑定与计价资格由插件拥有。`binding` 映射到统一请求或插件自己的 `providerOptions` 命名空间。
|
||||
|
||||
<!-- YINGCE_MANIFEST_CONTRACT_START -->
|
||||
## Manifest 完整接口定义
|
||||
|
||||
@@ -80,7 +84,7 @@ Agnes 官方图像端点,同步返回。文生图与图生图共用 /v1/images
|
||||
"apiVersion": "yingce.plugin/v2",
|
||||
"id": "agnes-image",
|
||||
"name": "Agnes Image",
|
||||
"version": "2.0.0",
|
||||
"version": "2.1.0",
|
||||
"author": "Agnes AI / 影策",
|
||||
"description": "Agnes Image 独立请求协议插件。",
|
||||
"documentation": "<当前插件的完整 documentation,由 README.md 与 docs/interface.md 拼接而成;为避免 JSON 递归,此处不重复展开正文。>",
|
||||
@@ -119,6 +123,37 @@ Agnes 官方图像端点,同步返回。文生图与图生图共用 /v1/images
|
||||
"type": "bearer",
|
||||
"field": "apiKey"
|
||||
},
|
||||
"imageParameters": [
|
||||
{
|
||||
"name": "size",
|
||||
"label": "画幅 / 尺寸",
|
||||
"type": "string",
|
||||
"binding": "aspectRatio"
|
||||
},
|
||||
{
|
||||
"name": "imageResolution",
|
||||
"label": "分辨率",
|
||||
"type": "string",
|
||||
"binding": "resolution",
|
||||
"values": [
|
||||
"1k",
|
||||
"2k",
|
||||
"4k"
|
||||
],
|
||||
"default": "1k",
|
||||
"pricing": true
|
||||
},
|
||||
{
|
||||
"name": "count",
|
||||
"label": "生成数量",
|
||||
"type": "integer",
|
||||
"binding": "imageCount",
|
||||
"min": 1,
|
||||
"max": 100,
|
||||
"step": 1,
|
||||
"default": 1
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "model",
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user