diff --git a/src/chat_with_audio.js b/src/chat_with_audio.js index 2933922..855234c 100644 --- a/src/chat_with_audio.js +++ b/src/chat_with_audio.js @@ -104,7 +104,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..0726fde 100644 --- a/src/index.js +++ b/src/index.js @@ -226,7 +226,7 @@ class WebRTCChat { async initializeHistory() { try { - await initializeHistoryMessage(); + await initializeHistoryMessage(100); console.log('历史消息初始化完成'); } catch (error) { console.error('历史消息初始化失败:', error);