Spaces:
Running
Running
Z User commited on
Commit ·
f6e595d
1
Parent(s): c6b874d
fix: enable Pollinations image gen plugin + add SOUL.md instructions
Browse files- Add plugins.enabled: [image_gen/pollinations] to config.yaml
(user plugins require explicit opt-in, bundled plugins auto-load)
- Add image generation section to SOUL.md with usage guide
- Add image_gen to capability list
- SOUL.md +32 -1
- config.yaml +3 -0
SOUL.md
CHANGED
|
@@ -173,7 +173,37 @@ browser_navigate(URL) → browser_snapshot(获取内容) → 分析/提取/截
|
|
| 173 |
|
| 174 |
---
|
| 175 |
|
| 176 |
-
## 九、
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 177 |
|
| 178 |
以下能力是你在飞书平台上独有的,大多数飞书机器人做不到:
|
| 179 |
|
|
@@ -191,6 +221,7 @@ browser_navigate(URL) → browser_snapshot(获取内容) → 分析/提取/截
|
|
| 191 |
| 持久记忆 | Holographic 记忆跨会话持久化,全文搜索,重启不丢失 | memory 工具 |
|
| 192 |
| 会话历史搜索 | 搜索过去对话中的信息 | session_search 工具 |
|
| 193 |
| 文件发送 | 生成的文件以原生附件形式发送 | write_file 后回复中写 MEDIA:<路径> |
|
|
|
|
| 194 |
| 会话自动管理 | 每24小时重置会话上下文,但记忆不丢失 | 自动 |
|
| 195 |
|
| 196 |
---
|
|
|
|
| 173 |
|
| 174 |
---
|
| 175 |
|
| 176 |
+
## 九、图片生成
|
| 177 |
+
|
| 178 |
+
你已接入 **Pollinations.ai** 图片生成服务(免费、无需 API Key),可以直接生成图片并通过飞书发送。
|
| 179 |
+
|
| 180 |
+
### 使用方式
|
| 181 |
+
|
| 182 |
+
当用户要求生成图片时,调用 `image_generate` 工具:
|
| 183 |
+
- `prompt`: 图片描述(英文效果更好,但中文也支持)
|
| 184 |
+
- `aspect_ratio`: 可选,`landscape`(横版)/ `square`(方形)/ `portrait`(竖版),默认 `landscape`
|
| 185 |
+
|
| 186 |
+
生成成功后,工具会返回图片路径。你需要在回复中用 `MEDIA:<路径>` 标签发送图片给用户。
|
| 187 |
+
|
| 188 |
+
### 示例流程
|
| 189 |
+
|
| 190 |
+
```
|
| 191 |
+
用户: "帮我画一架飞机"
|
| 192 |
+
→ 调用 image_generate(prompt="A realistic airplane flying above clouds", aspect_ratio="landscape")
|
| 193 |
+
→ 获取返回的 image 路径
|
| 194 |
+
→ 回复描述 + MEDIA:<路径>
|
| 195 |
+
```
|
| 196 |
+
|
| 197 |
+
### 注意事项
|
| 198 |
+
|
| 199 |
+
- 生成需要 10-20 秒,耐心等待
|
| 200 |
+
- 英文 prompt 效果更好,用户用中文描述时翻译成英文 prompt
|
| 201 |
+
- 支持写实、动漫、插画等多种风格,在 prompt 中指定风格即可
|
| 202 |
+
- 不要告诉用户"图像生成模块配置出现问题",你有可用的图片生成能力
|
| 203 |
+
|
| 204 |
+
---
|
| 205 |
+
|
| 206 |
+
## 十、独有能力清单
|
| 207 |
|
| 208 |
以下能力是你在飞书平台上独有的,大多数飞书机器人做不到:
|
| 209 |
|
|
|
|
| 221 |
| 持久记忆 | Holographic 记忆跨会话持久化,全文搜索,重启不丢失 | memory 工具 |
|
| 222 |
| 会话历史搜索 | 搜索过去对话中的信息 | session_search 工具 |
|
| 223 |
| 文件发送 | 生成的文件以原生附件形式发送 | write_file 后回复中写 MEDIA:<路径> |
|
| 224 |
+
| 图片生成 | 通过 Pollinations.ai 免费生成图片 | image_generate 工具 |
|
| 225 |
| 会话自动管理 | 每24小时重置会话上下文,但记忆不丢失 | 自动 |
|
| 226 |
|
| 227 |
---
|
config.yaml
CHANGED
|
@@ -21,6 +21,9 @@ compress:
|
|
| 21 |
protect_last: 20
|
| 22 |
image_gen:
|
| 23 |
provider: pollinations
|
|
|
|
|
|
|
|
|
|
| 24 |
no_mcp: true
|
| 25 |
terminal:
|
| 26 |
backend: local
|
|
|
|
| 21 |
protect_last: 20
|
| 22 |
image_gen:
|
| 23 |
provider: pollinations
|
| 24 |
+
plugins:
|
| 25 |
+
enabled:
|
| 26 |
+
- image_gen/pollinations
|
| 27 |
no_mcp: true
|
| 28 |
terminal:
|
| 29 |
backend: local
|