feat(image): 以插件声明统一图片参数、尺寸选择与定价合同 (#760)
* feat(image): 图片参数 - 统一插件声明配置与生成合同 * docs(image): 图片参数 - 说明声明合同与验证边界 * fix(plugins): 图片声明 - 保留内联素材支持并同步制品文档 * fix(image): 参数合同 - 对齐审批意图和尺寸预检调用方 * fix(image): 调用链 - 保留公开意图并接通独立分辨率 * fix(image): 图片参数 - 补齐分辨率接线与目录价格投影
This commit is contained in:
@@ -81,6 +81,10 @@
|
||||
|
||||
imageSize 只映射 1K/2K/4K;未知质量值(如视频清晰度 720)必须省略。多图输出由宿主按次创建,不映射 candidateCount。
|
||||
|
||||
## 动态图片参数
|
||||
|
||||
`contributes.providers[].imageParameters` 是渠道模型、前台模型与生成界面共用的参数合同。`name` 为稳定身份,`type`、`values`、`min/max/step`、`default` 描述输入;`models` 限定适用上游模型,`enabled` 为初始启用状态。只有 `pricing: true` 的启用字段允许作为价格条件;其他参数仍参与生成。渠道可收窄范围,绑定与计价资格由插件拥有。`binding` 映射到统一请求或插件自己的 `providerOptions` 命名空间。
|
||||
|
||||
<!-- YINGCE_MANIFEST_CONTRACT_START -->
|
||||
## Manifest 完整接口定义
|
||||
|
||||
@@ -91,7 +95,7 @@ imageSize 只映射 1K/2K/4K;未知质量值(如视频清晰度 720)必须
|
||||
"apiVersion": "yingce.plugin/v2",
|
||||
"id": "google-gemini-image",
|
||||
"name": "Google Gemini Image",
|
||||
"version": "2.0.0",
|
||||
"version": "2.1.0",
|
||||
"author": "Google / 影策",
|
||||
"description": "Google Gemini Image 独立请求协议插件。",
|
||||
"documentation": "<当前插件的完整 documentation,由 README.md 与 docs/interface.md 拼接而成;为避免 JSON 递归,此处不重复展开正文。>",
|
||||
@@ -130,6 +134,67 @@ imageSize 只映射 1K/2K/4K;未知质量值(如视频清晰度 720)必须
|
||||
"type": "google-api-key",
|
||||
"field": "apiKey"
|
||||
},
|
||||
"imageParameters": [
|
||||
{
|
||||
"name": "size",
|
||||
"label": "画幅比例",
|
||||
"type": "string",
|
||||
"binding": "aspectRatio",
|
||||
"encoding": "ratio",
|
||||
"values": [
|
||||
"1:1",
|
||||
"2:3",
|
||||
"3:2",
|
||||
"3:4",
|
||||
"4:3",
|
||||
"4:5",
|
||||
"5:4",
|
||||
"9:16",
|
||||
"16:9",
|
||||
"21:9"
|
||||
],
|
||||
"default": "1:1"
|
||||
},
|
||||
{
|
||||
"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": 1,
|
||||
"step": 1,
|
||||
"default": 1
|
||||
},
|
||||
{
|
||||
"name": "seed",
|
||||
"label": "随机种子",
|
||||
"type": "integer",
|
||||
"binding": "providerOptions.gemini-image.seed",
|
||||
"enabled": false
|
||||
},
|
||||
{
|
||||
"name": "temperature",
|
||||
"label": "随机程度",
|
||||
"type": "number",
|
||||
"binding": "providerOptions.gemini-image.temperature",
|
||||
"min": 0,
|
||||
"max": 2,
|
||||
"enabled": false
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "model",
|
||||
|
||||
Reference in New Issue
Block a user