Browse Source

思考过程使用导入图片的方式;

dev
宋杰 3 days ago
parent
commit
4a8daf207a
  1. 13
      src/views/AIchat.vue
  2. 12
      src/views/AiEmotion.vue

13
src/views/AIchat.vue

@ -18,6 +18,10 @@ import { useChatStore } from "../store/chat";
import { useAudioStore } from "../store/audio";
import { useDataStore } from "@/store/dataList.js";
import { marked } from "marked"; // marked
// GIF
import thinkingGif from '@/assets/img/gif/思考.gif';
import analyzeGif from '@/assets/img/gif/解析.gif';
import generateGif from '@/assets/img/gif/生成.gif';
import katex from "katex"; // KaTeX
import { htmlToText } from "html-to-text";
import { Howl, Howler } from "howler";
@ -953,7 +957,7 @@ async function showThinkingProcess(stockName = null) {
type: "ing",
flag: true,
content: "正在思考......",
gif: "/src/assets/img/gif/思考.gif",
gif: thinkingGif,
});
chatStore.messages.push(thinkingMessage1);
await new Promise((resolve) => setTimeout(resolve, 1500));
@ -966,7 +970,7 @@ async function showThinkingProcess(stockName = null) {
type: "ing",
flag: true,
content: "正在解析关键数据......",
gif: "/src/assets/img/gif/解析.gif",
gif: analyzeGif,
});
chatStore.messages.push(thinkingMessage2);
@ -986,7 +990,7 @@ async function showThinkingProcess(stockName = null) {
type: "ing",
flag: true,
content: `正在生成${stockName}全景作战报告......`,
gif: "/src/assets/img/gif/生成.gif",
gif: generateGif,
});
chatStore.messages.push(thinkingMessage3);
await new Promise((resolve) => setTimeout(resolve, 1500));
@ -999,7 +1003,6 @@ async function showThinkingProcess(stockName = null) {
type: "ing",
flag: true,
content: "报告已生成!",
gif: "/src/assets/img/gif/生成.gif",
});
chatStore.messages.push(thinkingMessage4);
await new Promise((resolve) => setTimeout(resolve, 1500));
@ -1028,7 +1031,7 @@ async function continueThinkingProcess(thinkingMessageRef, stockName) {
type: "ing",
flag: true,
content: `正在生成${stockName}全景作战报告......`,
gif: "/src/assets/img/gif/生成.gif",
gif: generateGif,
});
chatStore.messages.push(thinkingMessage3);
await new Promise((resolve) => setTimeout(resolve, 1500));

12
src/views/AiEmotion.vue

@ -228,6 +228,10 @@ import { ElMessage } from 'element-plus'; // 接口失败提示已改为对话
import { useEmotionStore } from '@/store/emotion'; // Pinia store
import { useEmotionAudioStore } from '@/store/emotionAudio.js'; // store
import { useChatStore } from '@/store/chat.js'; // store
// GIF
import thinkingGif from '@/assets/img/gif/思考.gif';
import analyzeGif from '@/assets/img/gif/解析.gif';
import generateGif from '@/assets/img/gif/生成.gif';
import getCountAll from "../assets/img/homePage/get-count-all.png";
import voice from "../assets/img/homePage/tail/voice.png";
import voiceNoActive from "../assets/img/homePage/tail/voice-no-active.png";
@ -1627,7 +1631,7 @@ async function showThinkingProcess(stockName = null) {
const thinkingMessage1 = reactive({
sender: 'ai',
text: 'AI情绪大模型正在思考......',
gif: '/src/assets/img/gif/思考.gif'
gif: thinkingGif
});
messages.value.push(thinkingMessage1);
await new Promise(resolve => setTimeout(resolve, 1500));
@ -1637,7 +1641,7 @@ async function showThinkingProcess(stockName = null) {
const thinkingMessage2 = reactive({
sender: 'ai',
text: 'AI情绪大模型正在解析关键数据......',
gif: '/src/assets/img/gif/解析.gif'
gif: analyzeGif
});
messages.value.push(thinkingMessage2);
@ -1654,7 +1658,7 @@ async function showThinkingProcess(stockName = null) {
const thinkingMessage3 = reactive({
sender: 'ai',
text: `AI情绪大模型正在生成${stockName}量子四维矩阵图......`,
gif: '/src/assets/img/gif/生成.gif'
gif: generateGif
});
messages.value.push(thinkingMessage3);
await new Promise(resolve => setTimeout(resolve, 1500));
@ -1686,7 +1690,7 @@ async function continueThinkingProcess(thinkingMessageRef, stockName) {
const thinkingMessage3 = reactive({
sender: 'ai',
text: `正在生成${stockName}量子四维矩阵图......`,
gif: '/src/assets/img/gif/生成.gif'
gif: generateGif
});
messages.value.push(thinkingMessage3);

Loading…
Cancel
Save