Feedback

Coze

本文主要介绍如何在接口中配置 Coze。
Coze(字节跳动出品)是一个零代码 AI 机器人平台,支持通过可视化界面创建和管理对话机器人,提供内置插件、知识库和记忆功能。如果你需要快速构建功能丰富的 AI 机器人而不想编写自定义后端逻辑,Coze 是理想的选型。

使用方式

如需使用 Coze 作为 LLM 引擎,请在 StartAIConversation API 的 LLMConfig 字段中传入以下 JSON。Coze 使用独立的 LLMType
// json — LLMConfig
{
"LLMType": "coze",
"APIKey": "<your_coze_api_key>",
"APIUrl": "https://api.coze.com/v3/chat?conversation_id=xxx",
"BotId": "<your_bot_id>",
"Streaming": true,
"UserId": "user_id",
"conversation_id": "xxx"
}
完整 Conversational AI 配置(STT、TTS、打断处理、VAD 等),请参阅 TRTC Conversational AI API 参考

参数参考

字段
类型
必填
说明
LLMType
String
固定值:"coze"
APIKey
String
Coze API 密钥。请从 Coze Developer Portal 获取。
APIUrl
String
Coze chat 端点(conversation_id 作为查询参数)。
BotId
String
你的 Coze Bot ID,来自 Coze 平台。
Streaming
Boolean
启用流式响应。默认值:true
UserId
String
用户标识符,用于会话追踪。
conversation_id
String
会话 ID,传入可继续历史会话。
更多 Coze 平台的详细信息,请参阅 Coze 文档
下一步:配置 TTS 提供商