> 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/web-plugins/convai-web-sdk-1.md).

# Convai Web SDK（旧版）

### 概述

{% hint style="info" %}
:no\_entry: 此插件已弃用，不再受支持。

\
如果你仍在运行旧版插件，我们建议切换到新的 Convai Web SDK： [链接](https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk)

\
仅供历史参考——这些文档已不再维护。
{% endhint %}

该 <mark style="color:绿色;">convai-web-sdk</mark> 是一个功能强大的 npm 包，可帮助开发者将栩栩如生的角色无缝集成到 Web 应用中。该 SDK 支持捕获用户音频流，并以音频、动作和面部表情的形式提供相应响应。无论你是在构建互动网站、聊天机器人还是游戏，这个包都能为你的用户体验增添人情味。

### **开始之前**

登录到 [Convai](https://convai.com/) 并复制你的 API 密钥。这将帮助你在后续步骤中与头像对话。

### **安装该包**

[Convai Web SDK](https://www.npmjs.com/package/convai-web-sdk?activeTab=readme) 可作为 npm 包使用。在你的 React 项目根目录中运行以下命令来安装该包。

`npm install convai-web-sdk@latest`

{% hint style="success" %}
LTS 版本：0.0.6
{% endhint %}

{% hint style="info" %}
在开始集成之前，请确保你已在 Convai 创建账户并拥有自己的 API 密钥。
{% 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/web-plugins/convai-web-sdk-1.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.
