diff --git a/examples/hunyuan/v20230901/chat_completions.ts b/examples/hunyuan/v20230901/chat_completions.ts index 0a047c5af..4d2090b66 100644 --- a/examples/hunyuan/v20230901/chat_completions.ts +++ b/examples/hunyuan/v20230901/chat_completions.ts @@ -1,6 +1,5 @@ import * as tencentcloud from "../../../tencentcloud" import { SSEResponseModel } from "../../../tencentcloud/common/sse_response_model" -import { ChatStdResponse } from "../../../tencentcloud/services/hunyuan/v20230901/hunyuan_models" // 导入对应产品模块的client models const HunyuanClient = tencentcloud.hunyuan.v20230901.Client @@ -30,11 +29,11 @@ client.ChatCompletions({ Stream: true, // 流式调用开关,默认为 true }).then( async (res) => { - res.on('message', (message) => { + (res as SSEResponseModel).on('message', (message) => { console.log(message) }) // 或者 - for await (let message of res) { + for await (let message of (res as SSEResponseModel)) { console.log(message) } },