humanchat-sdk 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -56,7 +56,7 @@ import XmenAI from 'humanchat-sdk';
|
|
|
56
56
|
|
|
57
57
|
const dh = new XmenAI({
|
|
58
58
|
token: 'YOUR_TOKEN', // 商务获取
|
|
59
|
-
projectId: 'YOUR_PROJECT_ID', //
|
|
59
|
+
projectId: 'YOUR_PROJECT_ID', // 数字人AI智能体创作平台「项目管理」页复制
|
|
60
60
|
container: document.getElementById('dh-box'),
|
|
61
61
|
width: 320,
|
|
62
62
|
height: 540,
|
|
@@ -108,7 +108,7 @@ const dh = new XmenAI({
|
|
|
108
108
|
> 3 步完成:① 创建项目 → ② 复制链接 → ③ 粘贴 iframe
|
|
109
109
|
|
|
110
110
|
### 3.1 获取嵌入地址
|
|
111
|
-
1. 登录 [
|
|
111
|
+
1. 登录 [数字人AI智能体平台](https://yh.bdbdigital.com) → 创建项目 → 发布
|
|
112
112
|
2. 在「发布成功」弹窗里点「复制链接」
|
|
113
113
|
3. 在 URL 后拼接参数(可组合):
|
|
114
114
|
|
|
@@ -165,7 +165,7 @@ window.addEventListener('message', e => {
|
|
|
165
165
|
## 4. 常见问题(通用)
|
|
166
166
|
| 问题 | 排查要点 |
|
|
167
167
|
|---|---|
|
|
168
|
-
| 初始化报 “token 无效” | 确认 token 与 projectId
|
|
168
|
+
| 初始化报 “token 无效” | 确认 token 与 projectId 在数字人AI智能体平台「已启用」 |
|
|
169
169
|
| 麦克风无权限 | HTTPS / 小程序声明 / 用户授权 |
|
|
170
170
|
| 调用 speak 无反应 | 是否触发 `onInitComplete`;是否触发 `onUpperLimit` |
|
|
171
171
|
| iframe 收不到消息 | 检查是否 HTTPS;后台是否放行跨域 |
|