ai-chat-bot-interface 1.6.18 → 1.6.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/ChatUi.vue +9 -1
package/package.json
CHANGED
package/src/ChatUi.vue
CHANGED
|
@@ -382,6 +382,13 @@ onMounted(async () => {
|
|
|
382
382
|
],
|
|
383
383
|
},
|
|
384
384
|
];
|
|
385
|
+
if (props.needLog) {
|
|
386
|
+
Emits('log', {
|
|
387
|
+
turns: turns.value,
|
|
388
|
+
info: historyList.value[historyList.value.length - 1],
|
|
389
|
+
});
|
|
390
|
+
turns.value += 1;
|
|
391
|
+
}
|
|
385
392
|
}
|
|
386
393
|
}
|
|
387
394
|
scrollToEnd();
|
|
@@ -499,12 +506,12 @@ const chatConv = async (data) => {
|
|
|
499
506
|
});
|
|
500
507
|
historyList.value.push(uObj);
|
|
501
508
|
isReq.value = '02';
|
|
502
|
-
turns.value += 1;
|
|
503
509
|
if (props.needLog) {
|
|
504
510
|
Emits('log', {
|
|
505
511
|
turns: turns.value,
|
|
506
512
|
info: uObj,
|
|
507
513
|
});
|
|
514
|
+
turns.value += 1;
|
|
508
515
|
}
|
|
509
516
|
const res = await fetch(
|
|
510
517
|
`https://api.coze.cn/v3/chat?conversation_id=${conversationId.value}`,
|
|
@@ -586,6 +593,7 @@ const chatConv = async (data) => {
|
|
|
586
593
|
turns: turns.value,
|
|
587
594
|
info: historyList.value[idx],
|
|
588
595
|
});
|
|
596
|
+
turns.value += 1;
|
|
589
597
|
}
|
|
590
598
|
scrollToEnd();
|
|
591
599
|
break;
|