Skip to content

Commit 463b5eb

Browse files
committed
feat: 语音支持
1 parent ba667ef commit 463b5eb

File tree

25 files changed

+1074
-51
lines changed

25 files changed

+1074
-51
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ Page({
108108
allowUploadImage: true, // 允许上传图片
109109
allowMultiConversation: true, // 允许客户端界面展示会话列表及新建会话按钮
110110
showToolCallDetail: true, // 允许展示 mcp server toolcall 细节
111+
allowVoice: true, // 允许展示语音按钮
111112
},
112113
modelConfig: {
113114
modelProvider: "hunyuan-open", // 大模型服务厂商
@@ -209,6 +210,7 @@ Page({
209210
| `allowUploadImage` | `Boolean` || 是否允许客户端界面展示图片上传及拍照上传 |
210211
| `allowMultiConversation` | `Boolean` || 是否允许客户端界面展示会话列表及新建会话按钮 |
211212
| `showToolCallDetail` | `Boolean` || 是否允许展示 mcp server toolcall 细节 |
213+
| `allowVoice` | `Boolean` || 是否允许客户端界面展示语音按钮 |
212214

213215
#### ModelConfig
214216

@@ -230,6 +232,12 @@ Page({
230232
231233
> **request合法域名配置**:微信小程序 Agent-UI 组件支持 上传文件&多会话 需要添加云开发域名到request合法域名列表,云开发域名为:https://{your-envid}.api.tcloudbasegateway.com, 可前往[微信公众平台](https://mp.weixin.qq.com)配置request合法域名
232234
235+
236+
> **语音**
237+
> 若未授予小程序使用麦克风权限,组件会进行权限申请,请同意授予
238+
239+
<img src="https://qcloudimg.tencent-cloud.cn/raw/55ce1f6862922bb1997720a51a84caab.png" width="375px">
240+
233241
配置示例
234242

235243
- **对接 DeepSeek 大模型**
@@ -317,6 +325,7 @@ Page({
317325
allowUploadImage: true, // 允许上传图片及拍照上传
318326
allowMultiConversation: true, // 允许客户端界面展示会话列表及新建会话按钮
319327
showToolCallDetail: true, // 允许展示 mcp server toolcall 细节
328+
allowVoice: true // 允许展示语音按钮
320329
}
321330
}
322331
//...

apps/miniprogram-agent-ui/miniprogram/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ App({
1010
// env 参数决定接下来小程序发起的云开发调用(wx.cloud.xxx)会默认请求到哪个云环境的资源
1111
// 此处请填入环境 ID, 环境 ID 可打开云控制台查看
1212
// 如不填则使用默认环境(第一个创建的环境)
13-
env: "luke-personal-test-new-8d0d90f5f",
13+
env: "luke-agent-dev-7g1nc8tqc2ab76af",
1414
traceUser: true,
1515
});
1616
}
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 2 additions & 0 deletions
Loading
Lines changed: 2 additions & 0 deletions
Loading
Lines changed: 2 additions & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)