feat(image): 以插件声明统一图片参数、尺寸选择与定价合同 (#760)
* feat(image): 图片参数 - 统一插件声明配置与生成合同 * docs(image): 图片参数 - 说明声明合同与验证边界 * fix(plugins): 图片声明 - 保留内联素材支持并同步制品文档 * fix(image): 参数合同 - 对齐审批意图和尺寸预检调用方 * fix(image): 调用链 - 保留公开意图并接通独立分辨率 * fix(image): 图片参数 - 补齐分辨率接线与目录价格投影
This commit is contained in:
1 parent
88de4ce422
commit
7466119867
104 files changed
+6013
-568
No files matched your search
@@ -71,6 +71,10 @@
|
||||
|
||||
有参考图时改走 /v1/images/edits;resolution 只接受 1k/2k;像素尺寸会换算为 aspect_ratio。
|
||||
|
||||
## 动态图片参数
|
||||
|
||||
`contributes.providers[].imageParameters` 是渠道模型、前台模型与生成界面共用的参数合同。`name` 为稳定身份,`type`、`values`、`min/max/step`、`default` 描述输入;`models` 限定适用上游模型,`enabled` 为初始启用状态。只有 `pricing: true` 的启用字段允许作为价格条件;其他参数仍参与生成。渠道可收窄范围,绑定与计价资格由插件拥有。`binding` 映射到统一请求或插件自己的 `providerOptions` 命名空间。
|
||||
|
||||
<!-- YINGCE_MANIFEST_CONTRACT_START -->
|
||||
## Manifest 完整接口定义
|
||||
|
||||
@@ -81,7 +85,7 @@
|
||||
"apiVersion": "yingce.plugin/v2",
|
||||
"id": "xai-grok-images",
|
||||
"name": "xAI Grok Images",
|
||||
"version": "2.0.0",
|
||||
"version": "2.1.0",
|
||||
"author": "xAI / 影策",
|
||||
"description": "xAI Grok Images 独立请求协议插件。",
|
||||
"documentation": "<当前插件的完整 documentation,由 README.md 与 docs/interface.md 拼接而成;为避免 JSON 递归,此处不重复展开正文。>",
|
||||
@@ -120,6 +124,49 @@
|
||||
"type": "bearer",
|
||||
"field": "apiKey"
|
||||
},
|
||||
"imageParameters": [
|
||||
{
|
||||
"name": "size",
|
||||
"label": "画幅比例",
|
||||
"type": "string",
|
||||
"binding": "aspectRatio",
|
||||
"encoding": "ratio",
|
||||
"values": [
|
||||
"1:1",
|
||||
"16:9",
|
||||
"9:16",
|
||||
"4:3",
|
||||
"3:4",
|
||||
"3:2",
|
||||
"2:3",
|
||||
"2:1",
|
||||
"1:2"
|
||||
],
|
||||
"default": "1:1"
|
||||
},
|
||||
{
|
||||
"name": "imageResolution",
|
||||
"label": "分辨率",
|
||||
"type": "string",
|
||||
"binding": "resolution",
|
||||
"values": [
|
||||
"1k",
|
||||
"2k"
|
||||
],
|
||||
"default": "1k",
|
||||
"pricing": true
|
||||
},
|
||||
{
|
||||
"name": "count",
|
||||
"label": "生成数量",
|
||||
"type": "integer",
|
||||
"binding": "imageCount",
|
||||
"min": 1,
|
||||
"max": 10,
|
||||
"step": 1,
|
||||
"default": 1
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "model",
|
||||
|
||||
Reference in new issue
Block a user