From 3f6c28c5c8561c198eb840e9d6ab6dabce04ee1f Mon Sep 17 00:00:00 2001 From: Adam Tilghman Date: Wed, 1 Nov 2023 19:18:56 -0700 Subject: [PATCH] second try --- src/lib/providers/openai/request.svelte | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/lib/providers/openai/request.svelte b/src/lib/providers/openai/request.svelte index 15a97da1..fa437e79 100644 --- a/src/lib/providers/openai/request.svelte +++ b/src/lib/providers/openai/request.svelte @@ -47,15 +47,11 @@ export const chatRequest = async ( // Remove updating indicator chatRequest.updating = 1 // hide indicator, but still signal we're updating chatRequest.updatingMessage = '' - // console.log('ev.data', ev.data) if (!chatResponse.hasFinished()) { if (ev.data === '[DONE]') { // ?? anything to do when "[DONE]"? } else { - d=ev.data - d.replace(/^data: /, '') - const data = JSON.parse(d) - console.log('data', data) + const data = JSON.parse(ev.data) window.setTimeout(() => { chatResponse.updateFromAsyncResponse(data) }, 1) } }