智能会议纪要服务提供以下 RESTful API:
Method | Path | 描述 |
---|---|---|
POST | /0/gateway_group/gateway/start_sync |
以同步模式开启会议纪要服务,即等到会议结束再返回会议纪要 |
POST | /0/gateway_group/gateway/start |
以异步模式开启会议纪要服务,即立马返回会议纪要 |
POST | /0/gateway_group/gateway/stop |
停止会议纪要服务 |
该 API 适用于在 Serverless 平台(例如阿里云函数计算)部署服务的场景。调用该 API 发送请求后,智能会议纪要服务将在会议结束后进行响应。
调用该 API 开启会议纪要服务后,你需要通过以下方式通知智能会议纪要服务会议已结束:
maxIdleTime
。如果频道内空闲(无任何人加入)时间超过你设置的最大空闲时间,会议会自动停止,会议纪要结果将发送到指定的 Webhook URL。/0/gateway_group/gateway/start_sync
hostname
:部署会议纪要服务的域名。
参数 | 必填/可选 | 类型 | 描述 |
---|---|---|---|
agoraRtcConfig.channelName |
必填 | String | 声网 RTC 频道名。 |
agoraRtcConfig.token |
可选 | String | 用于加入 RTC 频道的 Token。 |
agoraRtcConfig.uid |
可选 | String | 用户 ID,用于标识加入频道拉流的机器人。 |
agoraRtcConfig.encryption |
可选 | Object | 如果 RTC 频道设置了加密,该参数必须设置。该参数包含 mode、secret、salt 字段,分别对应 recordingConfig 的 decryptionMode、secret、salt 字段。 |
agoraRtmConfig.appId |
必填 | String | 用于声网 RTM 的 App ID。详见 RTM 2.x API。 |
agoraRtmConfig.uid |
必填 | String | 用于登录 RTM 系统的用户 ID。详见 RTM 2.x API。 |
agoraRtmConfig.token |
必填 | String | 用于登录 RTM 系统的 Token。详见 RTM 2.x API。 |
ossConfig.endpoint |
必填 | String | 你的第三方云存储地址,用于存储会议纪要结果。 |
ossConfig.accessKeyId |
必填 | String | 第三方云存储的 access key。 |
ossConfig.accessKeySecret |
必填 | String | 第三方云存储的 secret key。 |
ossConfig.bucketName |
必填 | String | 第三方云存储的 bucket。 |
ossConfig.ObjectName |
必填 | String | 第三方云存储的 Object name。 |
callbackUrl |
必填 | String | 用于接收会议纪要的 Webhook URL。 |
taskId |
必填 | String | 此次请求的 ID,需要确保唯一性。 |
maxIdleTime |
可选 | Int | 最大空闲时间(默认 30s)。 |
gptConfig.model |
可选 | String | 大模型名称。 |
gptConfig.temperature |
可选 | Float | 大模型的 temperature 设置。 |
gptConfig.maxTokens |
可选 | Float | 大模型处理的最大 token 数。 |
curl --location 'https://{hostname}/0/gateway_group/gateway/start_sync' \
--header 'X-Fc-Invocation-Type: Async' \
--header 'Content-Type: application/json' \
--data '{
"agoraRtcConfig": {
"channelName": "smt_meeting",
"token": "",
"uid": "",
"encryption": {
"mode": 0,
"secret": "",
"salt": ""
}
},
"agoraRtmConfig": {
"appId": "4c24d8fc36554a258402f08e96d30026",
"uid": "smt_meeting_service",
"token": "xxx"
},
"ossConfig": {
"endpoint": "oss-cn-shanghai.aliyuncs.com",
"accessKeyId": "xxx",
"accessKeySecret": "xxx",
"bucketName": "rte-platform",
"objectName": "rte_app/smart_meeting_minutes/test_dir/test.txt"
},
"callbackUrl": "https://webhook.site/70d83d2c-a260-4866-938b-db275cf53c2f",
"taskId": "aab",
"maxIdleTime": 100
}'
该 API 适用于不需要在 Serverless 平台上部署服务的场景,即可以向同一应用程序实例发送开始和停止请求。调用该 API 发送请求后,智能会议纪要服务会立即响应。
调用该 API 开启会议纪要服务后,你需要调用停止会议纪要服务 API停止会议,会议纪要的结果将发送到指定的 Webhook URL。
/0/gateway_group/gateway/start
hostname
:部署会议纪要服务的域名。
参数 | 必填/可选 | 类型 | 描述 |
---|---|---|---|
agoraRtcConfig.channelName |
必填 | String | 声网 RTC 频道名。 |
agoraRtcConfig.token |
可选 | String | 用于加入 RTC 频道的 Token。 |
agoraRtcConfig.uid |
可选 | String | 用户 ID,用于标识加入频道拉流的机器人。 |
agoraRtcConfig.encryption |
可选 | Object | 如果 RTC 频道设置了加密,该参数必须设置。该参数包含 mode、secret、salt 字段,分别对应 recordingConfig 的 decryptionMode、secret、salt 字段。 |
ossConfig.endpoint |
必填 | String | 你的第三方云存储地址,用于存储会议纪要结果。 |
ossConfig.accessKeyId |
必填 | String | 第三方云存储的 access key。 |
ossConfig.accessKeySecret |
必填 | String | 第三方云存储的 secret key。 |
ossConfig.bucketName |
必填 | String | 第三方云存储的 bucket。 |
ossConfig.ObjectName |
必填 | String | 第三方云存储的 Object name。 |
callbackUrl |
必填 | String | 用于接收会议纪要的 Webhook URL。 |
taskId |
必填 | String | 此次请求的 ID,需要确保唯一性。 |
maxIdleTime |
可选 | Int | 最大空闲时间(默认 30s)。 |
gptConfig.model |
可选 | String | 大模型名称。 |
gptConfig.temperature |
可选 | Float | 大模型的 temperature 设置。 |
gptConfig.maxTokens |
可选 | Float | 大模型处理的最大 token 数。 |
curl --location 'https://{hostname}/0/gateway_group/gateway/start' \
--header 'Content-Type: application/json' \
--data '{
"agoraRtcConfig": {
"channelName": "smt_meeting",
"token": "",
"uid": "",
"encryption": {
"mode": 0,
"secret": "",
"salt": ""
}
},
"ossConfig": {
"endpoint": "oss-cn-shanghai.aliyuncs.com",
"accessKeyId": "xxx",
"accessKeySecret": "xxx",
"bucketName": "rte-platform",
"objectName": "rte_app/smart_meeting_minutes/test_dir/test.txt"
},
"callbackUrl": "https://webhook.site/70d83d2c-a260-4866-938b-db275cf53c2f",
"taskId": "aab",
"maxIdleTime": 100
}'
/0/gateway_group/gateway/stop
同步模式下,因为不能向正在运行的应用程序实例发送停止请求,你可以部署另一个函数来向消息中间件发送停止请求。正在运行的应用程序实例将接收消息并停止会议纪要服务。以使用声网 RTM 系统作为消息中间件为例,你可以通过以下方式发送停止请求。
参数 | 必填/可选 | 类型 | 描述 |
---|---|---|---|
agoraRtmConfig.appId |
必填 | String | 用于声网 RTM 的 App ID。 |
agoraRtmConfig.uid |
必填 | String | 用于登录 RTM 系统的用户 ID。 |
agoraRtmConfig.token |
必填 | String | 用于登录 RTM 系统的 Token。 |
taskId |
必填 | String | 开启服务请求中填入的 taskId 。 |
curl --location 'https://smart-mtes-stop-rte-test-pmkrogjnwb.ap-southeast-1.fcapp.run/0/gateway_group/gateway/stop' \
--header 'Content-Type: application/json' \
--data '{
"taskId": "aab",
"agoraRtmConfig": {
"uid": "smt_meeting_service_zzz",
"token": "xxx",
"appId": "4c24d8fc36554a258402f08e96d30026"
}
}'
异步模式下,你可以向正在运行的应用程序实例发送停止请求。智能会议纪要服务停止后,会将会议纪要的结果发送到指定的 Webhook URL。
hostname
:部署会议纪要服务的域名。
参数 | 必填/可选 | 类型 | 描述 |
---|---|---|---|
taskId |
必填 | String | 开启服务请求中填入的 taskId 。 |
curl --location 'https://{hostname}/0/gateway_group/gateway/stop' \
--header 'Content-Type: application/json' \
--data '{
"taskId": "aab"
}'
如果返回的 HTTP 状态码为 200,表示请求成功。
如果返回的 HTTP 状态码为 500,表示请求失败,请参考包体里的错误原因进行排查。