diff --git a/docs/guide/model-plugin-system/active-memory.md b/docs/guide/model-plugin-system/active-memory.md new file mode 100644 index 0000000..474a0fe --- /dev/null +++ b/docs/guide/model-plugin-system/active-memory.md @@ -0,0 +1,35 @@ +# 主动记忆 + +相比被动的 [长期记忆](../session-related/long-term-memory.md),主动记忆工具更偏向于与人类交流般的主动记忆信息。 + +## 配置 + +- 在开始之前,确保 [长期记忆](../session-related/long-term-memory.md) 的前置配置已完成。(可以不启用长期记忆) +- 前往 Koishi 的插件市场,搜索 `chatluna-plugin-common`,并安装。 +- 按照下图配置在 `plugin-common` 插件中启用 `memory` 功能。 + +![alt text](../../public/images/image-49.png) + +## 测试 + +尝试和模型对话,让模型记住一些信息。 + + chatluna.chat.text 记住我的生日 1995.11.11 + + {
+   tool: 'memory_save',
+   arg: '{"input":"生日是1995年11月11日"}'
+ } +
+ 你的生日是1995年11月11日。 + chatluna.room.clear + 已清除房间 User 的房间 的聊天记录。 + chatluna.chat.text 我的生日是什么时候 + + {
+   tool: 'memory_search',
+   arg: '{"input":"birthday"}'
+ } +
+ 你的生日是1995年11月11日。 +
diff --git a/docs/guide/model-plugin-system/simple-audio-generation.md b/docs/guide/model-plugin-system/simple-audio-generation.md new file mode 100644 index 0000000..2b4c760 --- /dev/null +++ b/docs/guide/model-plugin-system/simple-audio-generation.md @@ -0,0 +1,43 @@ +# 简易音频生成 + +此工具基于 [@dgck81lnn/music](https://github.com/DGCK81LNN/koishi-plugin-music),提供一个简易的音频生成功能。 + +## 配置 + +- 前往 Koishi 插件市场安装 [@dgck81lnn/music](https://github.com/DGCK81LNN/koishi-plugin-music) 插件。 +- 在 `plugin-common` 插件中启用 `music` 功能。 + +![alt text](../../public/images/image-50.png) + +## 测试 + +尝试和模型对话,让它生成一段音频。如果成功返回了音频,则说明配置成功。 + + + chatluna.chat.text 生成欢乐颂旋律的前 15 秒 + + {
+   tool: 'music',
+   arg: '{"input":"bpm = 120;\nbaseFrequency = 440;\ngain = 0.5;\n\ntime = 0;\nnote(0, 0.75); note(0, 0.75); note(2, 0.75); note(4, 0.75);\nnote(4, 0.75); note(2, 0.75); note(0, 0.75); note(-1, 0.75);\nnote(-3, 1.5);\nrest(0.5);\nnote(4, 0.75); note(4, 0.75); note(2, 0.75); note(0, 0.75);\nnote(-1, 0.75); note(0, 1.5);\nrest(0.5);\nnote(2, 1.5); note(4, 1.5);\nnote(4, 1.5); note(2, 1.5);\nnote(0, 1.5);\nrest(0.5);\n"}'
+ } +
+ [假装是一条音频] + 如下是旋律的前15秒钟: +bpm = 120; +baseFrequency = 440; +gain = 0.5; + +time = 0; +note(0, 0.75); note(0, 0.75); note(2, 0.75); note(4, 0.75); +note(4, 0.75); note(2, 0.75); note(0, 0.75); note(-1, 0.75); +note(-3, 1.5); +rest(0.5); +note(4, 0.75); note(4, 0.75); note(2, 0.75); note(0, 0.75); +note(-1, 0.75); note(0, 1.5); +rest(0.5); +note(2, 1.5); note(4, 1.5); +note(4, 1.5); note(2, 1.5); +note(0, 1.5); +rest(0.5); + +
diff --git a/docs/public/images/image-49.png b/docs/public/images/image-49.png new file mode 100644 index 0000000..b3fb6e4 Binary files /dev/null and b/docs/public/images/image-49.png differ diff --git a/docs/public/images/image-50.png b/docs/public/images/image-50.png new file mode 100644 index 0000000..5ff839b Binary files /dev/null and b/docs/public/images/image-50.png differ