Skip to content

Commit 335565e

Browse files
committed
docs(config): update vitepress config and documentation content
- Cast transformerTwoslash() to any type to fix type issues - Correct GitHub repository URL casing - Reformat sidebar items for better readability - Add new "Rendering Templates" section and document template syntax - Update preset system introduction with new features and structure - Revise getting started guide for clarity and correct links - Improve write-preset documentation with updated formatting and examples - Update package manager version to yarn@4.10.3 - Adjust TypeScript patch metadata in yarn.lock
1 parent c78122d commit 335565e

File tree

8 files changed

+535
-116
lines changed

8 files changed

+535
-116
lines changed

docs/.vitepress/config.ts

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export default defineConfig({
106106

107107
md.use(InlineLinkPreviewElementTransform);
108108
},
109-
codeTransformers: [transformerTwoslash()],
109+
codeTransformers: [transformerTwoslash() as any],
110110
image: {
111111
lazyLoading: true,
112112
},
@@ -127,7 +127,7 @@ export default defineConfig({
127127
ThumbnailHashImages(),
128128
GitChangelog({
129129
maxGitLogCount: 2000,
130-
repoURL: () => "https://github.com/chatlunalab/doc",
130+
repoURL: () => "https://github.com/ChatLunaLab/doc",
131131
}),
132132
GitChangelogMarkdownSection({
133133
exclude: (id) => id.endsWith("index.md"),
@@ -176,7 +176,10 @@ function sidebarGuide(): DefaultTheme.SidebarItem[] {
176176
{ text: "房间", link: "/guide/useful-commands/room" },
177177
{ text: "预设", link: "/guide/useful-commands/preset" },
178178
{ text: "模型", link: "/guide/useful-commands/model" },
179-
{ text: "长期记忆", link: "/guide/useful-commands/memory" },
179+
{
180+
text: "长期记忆",
181+
link: "/guide/useful-commands/memory",
182+
},
180183
{ text: "系统", link: "/guide/useful-commands/system" },
181184
{
182185
text: "配置项",
@@ -379,13 +382,17 @@ function sidebarGuide(): DefaultTheme.SidebarItem[] {
379382
link: "/guide/preset-system/introduction",
380383
},
381384
{
382-
text: "使用预设",
383-
link: "/guide/preset-system/switch-preset",
385+
text: "渲染模板",
386+
link: "/guide/preset-system/template",
384387
},
385388
{
386389
text: "编写预设",
387390
link: "/guide/preset-system/write-preset",
388391
},
392+
{
393+
text: "使用预设",
394+
link: "/guide/preset-system/switch-preset",
395+
},
389396
{
390397
text: "分享预设",
391398
link: "/guide/preset-system/share-preset",

docs/guide/getting-started.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
在使用 ChatLuna 之前,你需要安装 Koishi。
88

9-
Koishi 是一个跨平台、可扩展、高性能的聊天机器人框架。
9+
Koishi 是一个跨平台、可扩展、高性能的聊天机器人框架。ChatLuna 基于 Koishi 框架开发。
1010

1111
按照 [Koishi 官方文档](https://koishi.chat/zh-CN/) 来安装 Koishi。
1212

@@ -16,9 +16,9 @@ Koishi 是一个跨平台、可扩展、高性能的聊天机器人框架。
1616
1717
### 配置聊天平台
1818

19-
安装 Koishi 后,你需要选择一个聊天平台来接入机器人,或使用 [沙盒环境](https://koishi.chat/zh-CN/manual/usage/adapter.html#%E5%9C%A8%E6%B2%99%E7%9B%92%E4%B8%AD%E6%A8%A1%E6%8B%9F%E5%AF%B9%E8%AF%9D) 测试
19+
安装 Koishi 后,你需要接入一个聊天平台来使用机器人,或在 [沙盒环境](https://koishi.chat/zh-CN/manual/usage/adapter.html#%E5%9C%A8%E6%B2%99%E7%9B%92%E4%B8%AD%E6%A8%A1%E6%8B%9F%E5%AF%B9%E8%AF%9D) 下测试
2020

21-
如你选择使用沙盒环境,可以直接跳到 [下一步](/guide/getting-started.html#安装前置依赖插件)
21+
如你选择使用沙盒环境,可以直接跳到 [下一步](#安装前置依赖服务)
2222

2323
如你选择接入实际的聊天平台,请参考 [接入真实聊天平台](https://koishi.chat/zh-CN/manual/usage/adapter.html#%E6%8E%A5%E5%85%A5%E7%9C%9F%E5%AE%9E%E8%81%8A%E5%A4%A9%E5%B9%B3%E5%8F%B0)
2424

docs/guide/preset-system/introduction.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
# 预设系统
22

3-
接下来我们将介绍如何使用预设系统,用于调教模型的对话风格,行为等。
3+
预设系统经过多次迭代,最终形成了具有 ChatLuna 特色功能的预设系统,这包括:
44

5-
预设系统类似 ChatGPT 的 [custom-instructions](https://openai.com/blog/custom-instructions-for-chatgpt),不同的是我们的预设系统可以伪造多条回复,内嵌变量,使得更适合角色扮演。不过两者都可自定义模型的对话风格,行为等。
5+
- 多条消息组成的多轮提示词
6+
- 世界书,作者注释与用户输入提示词
7+
- 强大的渲染模板
8+
9+
预设系统广泛应用在主插件和其他生态插件中(如伪装),强大的渲染模板可以让你的提示词基于变量动态改变某些功能,调用某些函数。
610

711
接下来可根据你的需求,自行阅读感兴趣的章节:
812

13+
- [渲染模板](./template.md)
14+
915
- [使用预设](./switch-preset.md)
1016

1117
- [编写预设](./write-preset.md)

docs/guide/preset-system/share-preset.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# 分享预设
22

3-
我们欢迎所有人分享自己的预设到 ChatLuna的预设仓库。
3+
我们欢迎所有人分享自己的预设到 ChatLuna 的预设仓库。
4+
5+
> [!TIP] 提示
6+
> ChatLuna 即将支持网页端直接上传预设,尽请期待。
47
58
如果你有预设想要分享,你可以按照以下步骤操作:
69

0 commit comments

Comments
 (0)