|
@@ -48,7 +48,7 @@
|
|
|
import shanshipin from '../../components/shanshipin.vue';
|
|
|
import robot from '../../assets/img/chat/robot_2.png';
|
|
|
import user from '../../assets/img/chat/user.png';
|
|
|
-import { showToast } from 'vant';
|
|
|
+// import { showToast } from 'vant';
|
|
|
import { ref, nextTick } from 'vue';
|
|
|
|
|
|
import textShow from './textShow.vue';
|
|
@@ -85,7 +85,7 @@ if (!userData.value.UserId) {
|
|
|
}
|
|
|
|
|
|
function saveText() {
|
|
|
- if (!userData.value.UserId) return showToast('请下载闪视频进行完整体验');
|
|
|
+// if (!userData.value.UserId) return showToast('请下载闪视频进行完整体验');
|
|
|
if (!inputText.value) return;
|
|
|
load.value = true;
|
|
|
nextTick(() => {
|
|
@@ -95,12 +95,15 @@ function saveText() {
|
|
|
}
|
|
|
});
|
|
|
let prompt = [];
|
|
|
- const startIndex = chat.value.length > 10 ? chat.value.length - 10 : 0;
|
|
|
+ const startIndex = chat.value.length > 9 ? chat.value.length - 9 : 0;
|
|
|
for (let i = startIndex; i < chat.value.length; i++) {
|
|
|
prompt.push(chat.value[i]);
|
|
|
}
|
|
|
ChartGpt({
|
|
|
- prompt,
|
|
|
+ prompt: [...prompt, {
|
|
|
+ text: inputText.value,
|
|
|
+ type: 'user',
|
|
|
+ }],
|
|
|
userId: userData.value.UserId || '',
|
|
|
userName: userData.value.UserName || '',
|
|
|
})
|