diff --git a/web/src/views/chat/index.vue b/web/src/views/chat/index.vue index 2b908e2f..d4c3efff 100644 --- a/web/src/views/chat/index.vue +++ b/web/src/views/chat/index.vue @@ -134,10 +134,9 @@ async function onConversationStream() { ) } else { - const lastIndex = responseText.lastIndexOf('data: ') + const lastIndex = responseText.lastIndexOf('\n\ndata:') // Extract the JSON data chunk from the responseText - const chunk = responseText.slice(lastIndex + 6) - + const chunk = responseText.slice(lastIndex + 8) // Check if the chunk is not empty if (chunk) { // Parse the JSON data chunk