diff --git a/src/App.vue b/src/App.vue index a9bc0bd390c85f9f1c2ba072a1682e6f7ef9c029..ed395d19db224de7022b3eea4141eb7800f07392 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';