> 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/cha-jian-yu-ji-cheng/unreal-engine/blueprints-reference/utility-functions.md).

# 实用函数

### 创建角色

* **描述：** 创建一个新角色并获取该角色的 ID。

<figure><img src="/files/8655359b6947863a65fd54645c1934b9b961162d" alt=""><figcaption></figcaption></figure>

**输入：**

* **角色名称：** 角色名称。
* **声音：** 声音名称 \[男性/女性]。
* **背景故事：** 新角色的背景故事。

**输出：**

#### ✅ \[成功时]

* **角色 ID：** 新角色的角色 ID。

#### ⛔ \[失败时]

*不返回任何内容，请查看日志以了解失败原因。*

### 获取所有角色 ID

* **描述：** 获取属于该用户的角色 ID 列表。

<figure><img src="/files/9c0ca10dbd005c12fc0b6706cb7d46e7c14b97b1" alt=""><figcaption></figcaption></figure>

**输出：**

#### ✅ \[成功时]

* C**har IDs**：角色列表。

#### ⛔ \[失败时]

*不返回任何内容，请查看日志以了解失败原因。*

### 获取角色详情

* **描述：** 获取角色的所有详细信息，包括背景故事、声音等。

<figure><img src="/files/d01b1e96e36cf42f0a5967000b83e110eb803c8f" alt=""><figcaption></figcaption></figure>

**输入：**

* **角色 ID：** 要获取所有详细信息的角色 ID。

**输出：**

#### ✅ \[成功时]

* **角色名称：** 你的角色名称。
* **声音类型：** 声音名称。
* **背景故事：** 角色背景故事。
* **是否有 Ready Player Me 链接：** 如果头像已在网站上配置，则为 True。
* **Ready Player Me 链接：** 用于下载的头像链接。

#### ⛔ \[失败时]

*不返回任何内容，请查看日志以了解失败原因。*

### 更新角色

* **描述：** 更新某个角色。

<figure><img src="/files/9a1ede2826d38f69d5cb7aae69d93d872a9a122b" alt=""><figcaption></figcaption></figure>

**输入：**

* **角色 ID：** 要更新的角色 ID。
* **新声音：** 声音名称或 \[男性/女性]。
* **新的背景故事：** 更新后的背景故事。
* **新的角色名称：** 角色名称。

{% hint style="info" %}
有关支持的语音列表，请参阅 [语音列表 API](/api-docs/zh/api-can-kao/core-api-reference/character-crafting-apis/voice-list-api.md).
{% endhint %}

{% 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/unreal-engine/blueprints-reference/utility-functions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
