> 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/guides/long-term-memory.md).

# 长期记忆 | Unreal Engine

#### 启用长期记忆的步骤

1. 在 Convai 网站的 Playground 中选择你的角色。
2. 前往 **记忆选项卡**，然后到 **记忆设置**。启用 **长期记忆** 该角色的此项功能。

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdi0A9NklIgt-d5Ftz4NWdHNXuSgCWNqofBPo6bpu50EC2AcLXiC_BnV8m1-FTQzk2Ob9_peusElQJlNaezDucB4y0gLnq5G4a2SVR9WOqmOngvAxw7_9GK4KtTmiaXxmI_rQ9y?key=E4IGNaHrJaNNjEd9PTsNBzqR" alt=""><figcaption></figcaption></figure>

#### 在 Unreal Engine 中设置 LTM 的步骤

1. 转到， **项目设置 -> 插件 -> Convai**。即你设置 API 密钥的地方。
2. 在那里，点击 **管理 Speaker ID**下方的按钮。 **长期记忆。** 这将弹出一个编辑器实用工具，用于创建、删除和列出 speaker ID。

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfVOObpWqcg0mMr5Rmp0Z-ZIgF4iHBIDE_MVR6SvrVroOd18JM3Y4hjhZ752jQXYV-dRRcAyzY9Vrulh1SfRMD1umwv8CseBgc8THwoBz2o7XReIgitWENsSmiLcy2UT4YhpWS6?key=E4IGNaHrJaNNjEd9PTsNBzqR" alt=""><figcaption></figcaption></figure>

3. 如果你已经创建了一个 Speaker ID，可以点击 **列出所有 Speaker ID**。然后，转到 **项目设置 -> 插件 -> Convai**，在其下方 **长期记忆**，你会找到 Speaker ID 数组。复制所需的 Speaker ID。
4. 现在，转到 Player Blueprint 并选择 ConvaiPlayer 组件。在详情面板中，你会在 Convai 类别下找到一个 Speaker ID 字段。将所需的 Speaker ID 粘贴到那里。

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


---

# 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/guides/long-term-memory.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.
