> For the complete documentation index, see [llms.txt](https://docs.convai.com/api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.convai.com/api-docs/zh/convai-playground/get-started/character-versioning.md).

# 角色版本管理

管理角色的多个版本，并根据需要在它们之间切换。

## 简介

本节将介绍角色版本管理，也就是维护角色的不同状态。这样，用户就能在尝试更多修改之前，保留一个稳定的旧版本。现在，您可以放心尝试，不必担心丢失角色的旧状态；如果您想放弃当前修改并返回之前的版本，也可以还原该版本并从那里继续创作。我们将这些保存的状态称为 **快照** 。

本节将介绍相关功能及其使用方法。

{% hint style="info" %}
文中 **快照** 和 **版本** 这两个术语交替使用，但它们指的是同一个概念：在特定时间点定义角色的状态／内容。
{% endhint %}

***

## 概述

角色编辑器部分右上方的 **更新** 按钮旁边提供了角色版本管理选项。

<figure><img src="https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2Fl2rY9dv4kT54lCOi7hob%2Fcv-1.png?alt=media&amp;token=38fd70af-e4c3-4e2b-af1d-03e867d4f984" alt=""><figcaption></figcaption></figure>

点击后，您会看到按日期排序的所有已保存修订版本列表。

<figure><img src="https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2FxmskYVPB5I7mmzBbJbFS%2F2.png?alt=media" alt=""><figcaption><p>角色版本管理部分。目前还没有快照。</p></figcaption></figure>

下一节将从头介绍创建和管理快照的步骤。

***

## 创建版本

首先，打开一个已保存的角色。打开角色详情时看到的数据，就是该角色的 **当前快照** 。与角色交互时，您实际上指的是该角色的所有数据， **当前快照** 。

1. 要创建新版本，请先打开 **角色版本管理** 部分，然后点击顶部的 **+ 添加快照** 图标。<br>

   <figure><img src="https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2FO87OyqDP1i9rf19iL3fZ%2Fcv-3.png?alt=media&amp;token=375c0149-695d-4336-9f93-d590d85db20d" alt=""><figcaption><p>来创建我们的第一个快照吧。</p></figcaption></figure>
2. 系统会弹出窗口，要求您为快照填写名称和描述。请注意，创建新版本时， **快照名称** 是必填项。填写完信息后，点击 **提交** 按钮。<br>

   <figure><img src="https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2F27CIDJfBUMezGcpfq1av%2Fcv-4.png?alt=media&amp;token=1258c8a2-d2ab-4594-b50b-9401ff18e3fd" alt=""><figcaption><p>我们填写了名称和简短描述。</p></figcaption></figure>
3. 现在，您可以在快照列表中看到新版本。这个版本具体代表什么？\
   此快照会保存该时间点与角色相关的所有数据，包括角色描述、角色具身信息、知识库文件、叙事设计结构以及其他详细信息。<br>

   <figure><img src="https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2Fa6jlIoKtz12aF63UtakB%2Fcv-5.png?alt=media&amp;token=7abd0b8e-754c-40e7-ba8d-69b2336dae15" alt=""><figcaption><p>快照显示在列表中</p></figcaption></figure>

***

## 还原版本

假设您继续编辑角色，却对结果不满意，想要回到之前的版本重新开始。这时，您可以将旧快照还原为当前状态，然后继续使用。操作步骤如下：

1. 要还原版本，请打开 **角色版本管理** 部分，然后选择要还原的快照。下方的 **还原版本** 按钮就会变为可用。<br>

   <figure><img src="https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2FRb8XT0vbcTa5rhQDto09%2Fcv-6.png?alt=media&amp;token=b06cf47b-110e-4fab-b87b-de1a7ee5173e" alt=""><figcaption><p>我们将还原第一个快照中的数据。</p></figcaption></figure>
2. 点击 **还原版本** 按钮后，会弹出窗口，询问您是否要将当前更改保存为新快照，或直接放弃。您可以将当前更改保存为测试版本，以便之后查阅。<br>

   <figure><img src="https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2FvR0Zd5Wm6HPTpTGGL6bC%2Fcv-7.png?alt=media&amp;token=1bb36dd2-daa8-44b5-af6d-11d80a1bede0" alt=""><figcaption><p>我们直接将快照中的数据还原到当前快照</p></figcaption></figure>
3. 目前，我们决定放弃这些更改，因此将点击 **还原** 按钮。所选版本中的数据将替换 **当前快照** 角色。
4. 要保存更改，您随时可以 **取消** 然后返回，创建包含当前进度的新快照并恢复它。

***

## 删除快照

您也可以删除不再需要的快照。为此，请点击列表中对应角色版本旁边的三点菜单，然后选择 **删除版本**

<figure><img src="https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2Fum3kJwDnlCD5I5oXEcRH%2F8.png?alt=media" alt=""><figcaption><p>点击快照旁边的三点菜单即可查看所有选项。</p></figcaption></figure>

### 请牢记以下几点

在任何时候，您都可以与角色的 **当前快照** 互动。如果您有任何公开可用的应用使用了该角色，用户将只能与此当前版本互动。

{% hint style="info" %}
我们目前正在开发一项功能，帮助开发者部署与 **当前快照不同的独立版本**.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.convai.com/api-docs/zh/convai-playground/get-started/character-versioning.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
