Feedback

Tencent Hunyuan

本文主要介绍如何在接口中配置腾讯 Hunyuan。
如需使用腾讯 Hunyuan 作为 LLM 引擎,请在 StartAIConversation API 的 LLMConfig 字段中传入以下 JSON:
// json — LLMConfig
{
"LLMType": "openai",
"Model": "hunyuan-2.0-thinking-20251109",
"APIKey": "<your_hunyuan_api_key>",
"APIUrl": "https://hunyuan.cloud.tencent.com/openai/v1/chat/completions",
"Streaming": true,
"SystemPrompt": "You are a helpful assistant.",
"Timeout": 3.0,
"History": 10,
"MetaInfo": {}
}
完整 Conversational AI 配置(STT、TTS、打断处理、VAD 等),请参阅 TRTC Conversational AI API 参考

参数参考

字段
类型
必填
说明
LLMType
String
固定值:"openai"
Model
String
模型:hunyuan-2.0-thinking-20251109hunyuan-2.0-instruct-20251111 等。请参阅 Hunyuan 模型
APIKey
String
你的 Hunyuan API 密钥。请从 Tencent Cloud Hunyuan Console 获取。
APIUrl
String
Hunyuan OpenAI 兼容端点。
Streaming
Boolean
启用流式响应。默认值:true
SystemPrompt
String
系统指令,用于引导模型行为。
Timeout
Float
超时时间(秒)。默认值:3。
History
Integer
对话轮次作为上下文。默认值:0。最大值:50。
MetaInfo
Object
自定义参数,会传入请求体中。
更多腾讯 Hunyuan 的详细信息,请参阅 Hunyuan 文档
下一步:配置 TTS 提供商