From 9a1bd0acfdbd8372e7e9e90a3ce92ac12280dc44 Mon Sep 17 00:00:00 2001 From: Song367 <601337784@qq.com> Date: Tue, 12 Aug 2025 11:10:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E8=BD=BD100=E6=9D=A1=E5=8E=86?= =?UTF-8?q?=E5=8F=B2=E5=AF=B9=E8=AF=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/chat_with_audio.js | 2 +- src/index.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/chat_with_audio.js b/src/chat_with_audio.js index a68247f..8051259 100644 --- a/src/chat_with_audio.js +++ b/src/chat_with_audio.js @@ -105,7 +105,7 @@ async function saveMessage(userInput, assistantResponse) { async function chatWithAudioStream(userInput) { // 确保历史消息已初始化 if (!isInitialized) { - await initializeHistoryMessage(); + await initializeHistoryMessage(100); } // 验证配置 diff --git a/src/index.js b/src/index.js index 4a43ae6..c4f74df 100644 --- a/src/index.js +++ b/src/index.js @@ -226,7 +226,8 @@ class WebRTCChat { async initializeHistory() { try { - await initializeHistoryMessage(); + await initializeHistoryMessage(100); + console.log('历史消息初始化完成'); } catch (error) { console.error('历史消息初始化失败:', error);