From 39fed091a055acb0b0698c6fee086d2cd19b64f7 Mon Sep 17 00:00:00 2001 From: 64104061f23fda247c679fa8 <64104061f23fda247c679fa8@devide> Date: Wed, 24 May 2023 01:53:52 +0000 Subject: [PATCH] Auto Commit --- src/App.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/App.vue b/src/App.vue index a9bc0bd..ed395d1 100644 --- a/src/App.vue +++ b/src/App.vue @@ -82,6 +82,10 @@ export default { dialog.text = ''; }, onmessage: (msg) => { + if (msg.data === '[DONE]') { + this.loading = false; + return; + }; const data = JSON.parse(msg.data); const finish_reason = data.choices[0].finish_reason; const finish = finish_reason === 'stop' || finish_reason === 'length'; -- GitLab