Fri Jun 9 07:35:00 UTC 2023 inscode

上级 50204e8f
......@@ -98,17 +98,18 @@ export default {
const finish_reason = data.choices[0].finish_reason;
const finish = finish_reason === 'stop' || finish_reason === 'length';
const content = data.choices[0].delta.content;
if (finish) {
this.loading = false;
} else if (content) {
const text = content;
for(let i=0;i<text.length;i++){
setTimeout
dialog.text += text[i];
}
}
setTimeout(()=>{
if (finish) {
this.loading = false;
} else if (content) {
const text = content;
dialog.text += text
console.log(dialog.text)
}
},700)
},
onerror: (err) => {
console.log("error", err);
......@@ -118,7 +119,10 @@ export default {
handleNewChat() {
this.dialogs = [];
},
typing
handleTyping(dialog,text){
}
}
}
</script>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册