Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .vitepress/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ export default defineConfig({
collapsed: true,
items: [
{ text: "WebUI", link: "/webui" },
{ text: "人格设定", link: "/persona" },
{ text: "插件", link: "/plugin" },
{ text: "内置指令", link: "/command" },
{ text: "工具使用 Tools", link: "/function-calling" },
Expand Down Expand Up @@ -376,6 +377,7 @@ export default defineConfig({
collapsed: true,
items: [
{ text: "WebUI", link: "/webui" },
{ text: "Persona", link: "/persona" },
{ text: "Plugins", link: "/plugin" },
{ text: "Built-in Commands", link: "/command" },
{ text: "Tool Use", link: "/function-calling" },
Expand Down
28 changes: 28 additions & 0 deletions en/use/persona.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Persona

Persona is one of the core features of AstrBot, allowing you to define different identities, personalities, reply styles, and available tools for your bot.

## Persona Management

You can manage all personas through the **Persona Management** page in the AstrBot Control Panel (WebUI).

### Creating a Persona
Click the **Create** button in the top right corner and fill in the following information:
- **Persona ID**: A unique identifier.
- **System Prompt**: Describes the bot's identity and behavioral guidelines.
- **Dialog Pairs**: Preset conversation examples to help the model better understand the settings.
- **Tools**: Tools that this persona can invoke.

### Import and Export
In version 4.12.4, we introduced the import and export functionality for personas, making it easier for users to share and back up their settings.

- **Export**: In the persona card menu, click **Export JSON**. This will download a JSON file containing the persona settings.
- **Import**: Click the **Import** button in the top right corner and select a previously exported JSON file. The system will automatically check for persona ID conflicts.

## Command Management

You can also manage and switch personas through commands in the chat.

- `/persona list`: Lists all personas in a tree structure.
- `/persona <persona_id>`: Switches to the specified persona.
- `/persona view <persona_id>`: Views detailed information about a persona.
28 changes: 28 additions & 0 deletions zh/use/persona.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 人格设定

人格设定(Persona)是 AstrBot 的核心功能之一,它允许你为机器人设定不同的身份、性格、回复风格以及可使用的工具。

## 人格管理

你可以通过 AstrBot 管理面板(WebUI)的 **人格管理** 页面来管理所有人格。

### 创建人格
点击页面右上角的 **创建** 按钮,填写以下信息:
- **人格 ID**: 唯一标识符。
- **系统提示词 (System Prompt)**: 描述机器人的身份和行为准则。
- **对话对 (Dialog Pairs)**: 预设的对话示例,帮助模型更好地理解设定。
- **工具 (Tools)**: 该人格可以调用的工具。

### 导入与导出
在 v4.12.4 版本中,我们引入了人格的导入与导出功能,方便用户分享和备份人格设定。

- **导出**: 在人格卡片的菜单中,点击 **导出 JSON**。这将下载一个包含该人格设定的 JSON 文件。
- **导入**: 点击页面右上角的 **导入** 按钮,选择之前导出的 JSON 文件即可。系统会自动检查人格 ID 是否冲突。

## 指令管理

你也可以通过指令在聊天中管理和切换人格。

- `/persona list`: 以树状结构列出所有人格。
- `/persona <人格名>`: 切换到指定人格。
- `/persona view <人格名>`: 查看人格的详细信息。