Auto Commit

上级 3daf8636
...@@ -82,6 +82,10 @@ export default { ...@@ -82,6 +82,10 @@ export default {
dialog.text = ''; dialog.text = '';
}, },
onmessage: (msg) => { onmessage: (msg) => {
if (msg.data === '[DONE]') {
this.loading = false;
return;
};
const data = JSON.parse(msg.data); const data = JSON.parse(msg.data);
const finish_reason = data.choices[0].finish_reason; const finish_reason = data.choices[0].finish_reason;
const finish = finish_reason === 'stop' || finish_reason === 'length'; const finish = finish_reason === 'stop' || finish_reason === 'length';
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册