> 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/playcanvas-plugin/adding-external-script.md).

# 添加外部脚本

在这里我们将添加 [Convai Web SDK](https://www.npmjs.com/package/convai-web-sdk) 到我们的项目中，它是一个 JavaScript 库，可用于集成对话式 AI 功能。

1. 登录后创建一个空白项目。
2. 在 SETTINGS 面板中打开设置部分。
3. 将 Array Size 增加到 1，以添加 1 个外部脚本。
4. 添加 [Convai web-sdk-cdn](https://github.com/Conv-AI/web-sdk-cdn) 在 URL 部分中的链接。

<figure><img src="/files/44e36a2b7a4b0c4640f8f3771d1753739c7edcd7" alt=""><figcaption><p>空白项目</p></figcaption></figure>

### ![](/files/1a0309fdb9184176daeb69a3e1440d7969ece6f9)


---

# 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/playcanvas-plugin/adding-external-script.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.
