-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(guide): add active memory and simple audio generation features
- Add documentation for active memory feature in Koishi's plugin system - Include configuration and testing instructions for active memory - Add documentation for simple audio generation feature - Provide setup and test examples for audio generation - Include relevant images for plugin configuration
- Loading branch information
1 parent
762c026
commit cce4db2
Showing
4 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) | ||
|
||
## 测试 | ||
|
||
尝试和模型对话,让模型记住一些信息。 | ||
<chat-panel> | ||
<chat-message nickname="User">chatluna.chat.text 记住我的生日 1995.11.11</chat-message> | ||
<chat-message nickname="Bot"> | ||
{<br> | ||
tool: 'memory_save',<br> | ||
arg: '{"input":"生日是1995年11月11日"}'<br> | ||
} | ||
</chat-message> | ||
<chat-message nickname="Bot">你的生日是1995年11月11日。</chat-message> | ||
<chat-message nickname="User">chatluna.room.clear</chat-message> | ||
<chat-message nickname="Bot">已清除房间 User 的房间 的聊天记录。</chat-message> | ||
<chat-message nickname="User">chatluna.chat.text 我的生日是什么时候</chat-message> | ||
<chat-message nickname="Bot"> | ||
{<br> | ||
tool: 'memory_search',<br> | ||
arg: '{"input":"birthday"}'<br> | ||
} | ||
</chat-message> | ||
<chat-message nickname="Bot">你的生日是1995年11月11日。</chat-message> | ||
</chat-panel> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) | ||
|
||
## 测试 | ||
|
||
尝试和模型对话,让它生成一段音频。如果成功返回了音频,则说明配置成功。 | ||
|
||
<chat-panel> | ||
<chat-message nickname="User">chatluna.chat.text 生成欢乐颂旋律的前 15 秒</chat-message> | ||
<chat-message nickname="Bot"> | ||
{<br> | ||
tool: 'music',<br> | ||
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"}'<br> | ||
} | ||
</chat-message> | ||
<chat-message nickname="Bot">[假装是一条音频]</chat-message> | ||
<chat-message nickname="Bot">如下是旋律的前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); | ||
</chat-message> | ||
</chat-panel> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.