fix: 脚本路径

This commit is contained in:
hp0912 2026-04-05 00:09:21 +08:00
parent 6854f83c54
commit 4e54528b3c

View File

@ -71,28 +71,16 @@ argument-hint: "需要 prompt 参数(画图提示词),可选 model
}
```
## 环境变量
- `ROBOT_CODE`:机器人实例编码,用作数据库名称。
- `ROBOT_FROM_WX_ID`:微信消息来源(群聊 ID 或好友微信 ID用于判断查询群聊配置还是好友配置。
- `MYSQL_HOST`MySQL 数据库地址。
- `MYSQL_PORT`MySQL 数据库端口。
- `MYSQL_USER`MySQL 数据库用户名。
- `MYSQL_PASSWORD`MySQL 数据库密码。
## 依赖安装
- 在执行 `text-to-image/scripts/text_to_image.py` 之前,必须先安装依赖。
- 建议优先执行安装脚本:`python3 skills/text-to-image/scripts/bootstrap.py`
- 该脚本会自动执行:`python3 -m pip install -r skills/text-to-image/scripts/requirements.txt`
- 如果不使用安装脚本,也可以直接执行:`python3 -m pip install -r skills/text-to-image/scripts/requirements.txt`
- 如果环境里已经安装过这些依赖,重复安装通常不会报错,只会做已满足检查。
- 执行安装脚本:`python3 text-to-image/scripts/bootstrap.py`
## 执行步骤
1. 当用户输入绘图相关内容时触发该技能。
2. 从用户输入中提取 prompt画图提示词不对提示词做总结或修改。可选提取 model、negative_prompt、ratio、resolution 参数。
3. 在执行脚本前,先安装依赖:`python3 skills/text-to-image/scripts/bootstrap.py`。
3. 在执行脚本前,先安装依赖:`python3 text-to-image/scripts/bootstrap.py`。
4. 将参数组装为 JSON 字符串,在仓库根目录下执行本地脚本:`python3 text-to-image/scripts/text_to_image.py '<JSON参数>'`。
5. 成功是脚本输出