diff --git a/1000-hours/.vitepress/config.mts b/1000-hours/.vitepress/config.mts index 25486454..c156322e 100644 --- a/1000-hours/.vitepress/config.mts +++ b/1000-hours/.vitepress/config.mts @@ -448,6 +448,16 @@ export default withMermaid( { text: "视频资源", link: "/enjoy-app/videos" }, ], }, + { + text: "聊天", + collapsed: false, + items: [ + { text: "简介", link: "/enjoy-app/chat" }, + { text: "与智能体对话", link: "/enjoy-app/chat-with-agent" }, + { text: "多个智能体群聊", link: "/enjoy-app/chat-group" }, + { text: "Copilot", link: "/enjoy-app/chat-copilot" }, + ], + }, { text: "阅读文本", collapsed: false, diff --git a/1000-hours/enjoy-app/chat-copilot.md b/1000-hours/enjoy-app/chat-copilot.md new file mode 100644 index 00000000..e69de29b diff --git a/1000-hours/enjoy-app/chat-group.md b/1000-hours/enjoy-app/chat-group.md new file mode 100644 index 00000000..4245cdf7 --- /dev/null +++ b/1000-hours/enjoy-app/chat-group.md @@ -0,0 +1,31 @@ +# 多个智能体群聊 + +Enjoy 的聊天支持多个智能体同时参与,仅限 GPT 智能体。 + +## 增加聊天成员 + +在聊天中,点击右上角齿轮图标,在 `聊天成员` 中,点击 `+增加群成员` 按钮,即可增加聊天成员。 + +![chat-group-add-member](/images/enjoy/chat-add-member.png) + +每次用户发新信息的时候,聊天内每个成员将会轮流发言。 + +![chat-group-replies](/images/enjoy/chat-group-replies.png) + +::: info 提示 +如果你希望智能体之间相互对话,而本身不参与,可以点击聊天输入框最右侧的播放(继续)按钮,可以触发聊天内的智能体根据聊天记录轮流继续对话。 +::: + +## 指定智能体回复 + +如果在聊天过程中,希望得到特定某一个智能体的帮助,可以直接在输入框中输入 `@` 符号,将会弹起智能体选择列表,选择智能体后,再输入问题发送即可。 + +![chat-mention-agent](/images/enjoy/chat-mention-agent.png) + +如果指定的智能体已经在当前聊天中,它将会回复你的问题,而聊天中的其他成员在将会在此轮对话中不发言。 + +如果指定的智能体原本不在这个聊天中,则会自动加入到当前聊天中,并在当前轮对话中发言。 + +值得注意的是,通过 `@` 符号添加的群成员,在设置中 `仅被提及时回复` 的选项将会被默认勾选,即在该聊天中,只有通过 `@` 符号提及该智能体时,它才会发言,否则将不参与对话。 + +`仅被提及时回复` 选项在成员设置中可以修改。 diff --git a/1000-hours/enjoy-app/chat-with-agent.md b/1000-hours/enjoy-app/chat-with-agent.md new file mode 100644 index 00000000..2910f949 --- /dev/null +++ b/1000-hours/enjoy-app/chat-with-agent.md @@ -0,0 +1,57 @@ +# 与智能体对话 + +## 新建智能体 + +在 `聊天` 页面左侧栏右上角,点 `+` 按钮,弹出添加智能体对话框。 + +目前 Enjoy 的智能体支持两种类别: + +- GPT +- TTS + +GPT 智能体可以通过设定不同的提示语,扮演不同的角色,与用户进行文本对话。 + +TTS 智能体可以将用户输入的文本转换为语音,可以设定不同的语言和音色。 + +### GPT 智能体 + +当选择 GPT 类别时,Enjoy 内置了部分提示语的模板,可以从 `模板` 中选择。 + +![chat-gpt-select-template](/images/enjoy/chat-gpt-select-template.png) + +选择任意模板后,智能体名称、描述、提示语会自动填充,也可以根据具体需求进行修改。 + +点 `保存` 按钮,智能体即创建成功。 + +### TTS 智能体 + +当选择 TTS 类别时,除了名称和描述,还需要对 TTS 进行配置。 + +- 语音引擎: 如果想使用自备 OpenAI 密钥,可以选择 `OpenAI`,否则选择 `EnjoyAI`。 +- 语音模型: 当使用 `EnjoyAI` 时,支持 OpenAI 的两个模型,以及 `Azure/Speech`,后者支持更多语言和口音; +- TTS 语言: 仅对 `Azure/Speech` 有效,支持更多语言和口音; +- 语音音色: 当使用 `Azure/Speech` 时,不用语言对应多种音色,选择即可。 + +![chat-tts-config](/images/enjoy/chat-tts-agent.png) + +点 `保存` 按钮,智能体即创建成功。 + +## 新建聊天 + +选择任意智能体,在左侧栏下点击 `新聊天` 按钮,即可开始对话。 + +GPT 智能体会根据**提示语的设定**回答用户的**任何问题**。 + +![chat-new-chat-gpt](/images/enjoy/chat-new-chat-gpt.png) + +TTS 智能体会把用户输入的任意文本转换为语音。 + +![chat-new-chat-tts](/images/enjoy/chat-new-chat-tts.png) + +## 聊天设置 + +在聊天中,点击右上角齿轮图标,可以对聊天、当前聊天成员进行详细设置。 + +![chat-settings](/images/enjoy/chat-settings.png) + +![chat-member-settings](/images/enjoy/chat-member-settings.png) diff --git a/1000-hours/enjoy-app/chat.md b/1000-hours/enjoy-app/chat.md new file mode 100644 index 00000000..b18e4937 --- /dev/null +++ b/1000-hours/enjoy-app/chat.md @@ -0,0 +1,3 @@ +# 简介 + +通过 Enjoy 的 `聊天` 功能,用户可以创建不同的智能体,通过于智能体对话的形式,实现各种不同的功能。 diff --git a/1000-hours/enjoy-app/settings.md b/1000-hours/enjoy-app/settings.md index a21760e0..b9eeaa90 100644 --- a/1000-hours/enjoy-app/settings.md +++ b/1000-hours/enjoy-app/settings.md @@ -33,10 +33,10 @@ Enjoy 只需要登录后即可直接使用,**无需其他设置**。但是, 该设置默认项为 `本地`,即利用 Enjoy 集成的 whisper 组件,完全利用本地计算机的算力提供 STT 服务,该服务完全免费。 -Enjoy 软件集成了最小的 whisper 模型 `tiny.en`,如果电脑配置较高,可以选用更大的模型以提高语音转文本的准确度。点击 `模型` 按钮,在弹窗中选择相应的模型即可自动下载并选中。 +Enjoy 默认选择 whisper 模型 `tiny.en`,如果电脑配置较高,可以选用更大的模型以提高语音转文本的准确度。 ::: tip 关于 whisper 模型的选择 -下载的 whisper 模型会保存在 `/EnjoyLibrary/whisper/models/` 文件夹下。如果自动下载失败,也可以到 [这里](https://hf-mirror.com/ggerganov/whisper.cpp) 手动下载,放置在该文件夹下,在 Enjoy 中即可以选中。 +首次使用时,程序会自动下载模型,选择的模型越大,下载所需要的时间也越长。推荐一般使用 `medium` 以下模型即可。 理论上,模型越大,识别的准确度也更高,但是运行得越慢,甚至在一些配置不高的电脑中无法运行。 diff --git a/1000-hours/public/images/enjoy/chat-add-member.png b/1000-hours/public/images/enjoy/chat-add-member.png new file mode 100644 index 00000000..55c5f5ce Binary files /dev/null and b/1000-hours/public/images/enjoy/chat-add-member.png differ diff --git a/1000-hours/public/images/enjoy/chat-gpt-select-template.png b/1000-hours/public/images/enjoy/chat-gpt-select-template.png new file mode 100644 index 00000000..8b10ebfe Binary files /dev/null and b/1000-hours/public/images/enjoy/chat-gpt-select-template.png differ diff --git a/1000-hours/public/images/enjoy/chat-group-replies.png b/1000-hours/public/images/enjoy/chat-group-replies.png new file mode 100644 index 00000000..577a975e Binary files /dev/null and b/1000-hours/public/images/enjoy/chat-group-replies.png differ diff --git a/1000-hours/public/images/enjoy/chat-member-settings.png b/1000-hours/public/images/enjoy/chat-member-settings.png new file mode 100644 index 00000000..d28b5e8f Binary files /dev/null and b/1000-hours/public/images/enjoy/chat-member-settings.png differ diff --git a/1000-hours/public/images/enjoy/chat-mention-agent.png b/1000-hours/public/images/enjoy/chat-mention-agent.png new file mode 100644 index 00000000..bb4af539 Binary files /dev/null and b/1000-hours/public/images/enjoy/chat-mention-agent.png differ diff --git a/1000-hours/public/images/enjoy/chat-new-chat-gpt.png b/1000-hours/public/images/enjoy/chat-new-chat-gpt.png new file mode 100644 index 00000000..a9293c89 Binary files /dev/null and b/1000-hours/public/images/enjoy/chat-new-chat-gpt.png differ diff --git a/1000-hours/public/images/enjoy/chat-new-chat-tts.png b/1000-hours/public/images/enjoy/chat-new-chat-tts.png new file mode 100644 index 00000000..d7c9e151 Binary files /dev/null and b/1000-hours/public/images/enjoy/chat-new-chat-tts.png differ diff --git a/1000-hours/public/images/enjoy/chat-settings.png b/1000-hours/public/images/enjoy/chat-settings.png new file mode 100644 index 00000000..62e7ce44 Binary files /dev/null and b/1000-hours/public/images/enjoy/chat-settings.png differ diff --git a/1000-hours/public/images/enjoy/chat-tts-agent.png b/1000-hours/public/images/enjoy/chat-tts-agent.png new file mode 100644 index 00000000..b0aadf97 Binary files /dev/null and b/1000-hours/public/images/enjoy/chat-tts-agent.png differ