diff --git a/ui/src/components/ai-chat/index.vue b/ui/src/components/ai-chat/index.vue index cd5356c47c2..49d29fab2b2 100644 --- a/ui/src/components/ai-chat/index.vue +++ b/ui/src/components/ai-chat/index.vue @@ -439,7 +439,6 @@ const getWrite = (chat: any, reader: any, stream: boolean) => { tempResult += str const split = tempResult.match(/data:.*?}\n\n/g) - if (split) { str = split.join('') tempResult = tempResult.replace(str, '') @@ -584,7 +583,7 @@ function chatMessage(chat?: any, problem?: string, re_chat?: boolean, other_para reader, response.headers.get('Content-Type') !== 'application/json', ) - return reader.read().then(write) + return write() } }) .then(() => {