Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
swuecho committed Mar 27, 2023
1 parent 7e8226d commit 8d99464
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions web/src/views/chat/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8d99464

Please sign in to comment.