1. 将ai_gen_image插件默认模型从gpt-image-1调整为gpt-image-2,与image.generate场景保持一致。 2. 解决插件本地默认模型覆盖全局路由模型后导致的model_not_found问题。 3. 已通过真实图片生成请求验证,成功落盘PNG图片。
39 lines
1.4 KiB
TOML
39 lines
1.4 KiB
TOML
[AIGenImage]
|
||
enable = true
|
||
command = ["AI绘图", "绘图", "画图", "生成图片"]
|
||
command-format = """
|
||
🎨AI绘图指令:
|
||
AI绘图 描述文字
|
||
"""
|
||
|
||
# OpenAI 兼容图片生成参数。
|
||
# 当前 image.generate 场景在全局 llm 配置里已路由到 gpt-image-2,
|
||
# 这里同步使用相同模型,避免插件本地默认值覆盖场景模型后出现 model_not_found。
|
||
default_model = "gpt-image-2"
|
||
image_quality = "standard"
|
||
image_response_format = "b64_json"
|
||
image_count = 1
|
||
|
||
# 图片尺寸配置:
|
||
# 1. image_size 会优先直接用于 OpenAI 兼容接口;
|
||
# 2. default_width/default_height 主要用于旧版 pollinations 回退逻辑;
|
||
# 3. 为了兼容老逻辑,这两组配置同时保留。
|
||
image_size = "1024x1024"
|
||
default_width = 1024
|
||
default_height = 1024
|
||
default_timeout = 300
|
||
|
||
# 旧版回退接口配置:
|
||
# 当没有配置 llm.scene,且也没有单独提供网关地址/密钥时,
|
||
# 插件会继续使用原来的 pollinations 逻辑生成图片。
|
||
image_api_url = "https://image.pollinations.ai/prompt/{prompt}"
|
||
legacy_model = "turbo"
|
||
|
||
# 图片生成主配置:
|
||
# 1. 推荐通过 llm.scene 走项目统一的 LLM 配置路由;
|
||
# 2. 插件会从该 scene 对应的 backend 中复用 api_base_url / api_key;
|
||
# 3. 图片接口默认请求 images/generations,如需特殊网关可在这里覆盖 image_endpoint。
|
||
[AIGenImage.llm]
|
||
scene = "image.generate"
|
||
image_endpoint = "images/generations"
|