mirror of
https://gitcode.com/JianFeeeee/HomeAgent.git
synced 2026-10-04 00:03:59 +00:00
feat(ai_image): base_url 设置项支持自定义 OpenAI 兼容网关 v1.1.0
generateOpenAI 原硬编码上游为 https://api.openai.com,无法接入 本机 llmsproxy(ModelRouter) 等标准 OpenAI 兼容网关。新增: - 设置项 base_url(string,默认空):为空保持官方直连;非空时 上游改为 {base_url}/v1/images/generations(约定不带 /v1 尾缀, 拼接时自动去重避免 /v1/v1) - Plugin.baseURL 字段 Start 时读入;注册 ConfigDef(category ai_image)供 WebUI 配置页展示 部署:plugindev 打包 1.1.0 → pluginmgr overwrite:true 升级安装 config_kept=true → plgreload 热加载。 配置(category ai_image):api_key=sk-gw-local-0001, base_url=http://127.0.0.1:8081, provider=openai, model=Kwai-Kolors/Kolors, size=1024x1024 验收:agent 实调 ai_image_generate 出图成功——llmsproxy audit 记录 type=image src=siliconflow model=AUTO ok=true(经网关非直连), 返回临时 S3 URL 下载为有效 PNG (1024x1024)。
This commit is contained in:
20
third_party/homeagent-sdk/example/ai_image/plg.json
vendored
Normal file
20
third_party/homeagent-sdk/example/ai_image/plg.json
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"name": "ai_image",
|
||||
"name_zh": "AI绘图",
|
||||
"name_en": "AI Image",
|
||||
"version": "1.1.0",
|
||||
"description": "AI 图像生成插件,支持 OpenAI DALL·E / Stable Diffusion",
|
||||
"author": "HomeAgent",
|
||||
"entry": "plugin.so",
|
||||
"tags": [
|
||||
"ai",
|
||||
"image",
|
||||
"draw",
|
||||
"generate"
|
||||
],
|
||||
"targets": "linux/amd64",
|
||||
"outdir": "dist",
|
||||
"bundle": true,
|
||||
"replaces": {},
|
||||
"source_dirs": []
|
||||
}
|
||||
Reference in New Issue
Block a user