| | |
| | | import * as authUtil from "@/utils/auth"; |
| | | import {refreshToken} from "@/api/login"; |
| | | import {formatToDateTime} from "@/utils/dateUtil"; |
| | | import {ElLoading} from "element-plus"; |
| | | import { formatReasoningContent } from '@/views/ai/utils/utils' |
| | | |
| | | /** AI 聊天对话 列表 */ |
| | | defineOptions({ name: 'NormalConversation' }) |
| | |
| | | return [] |
| | | }) |
| | | |
| | | // //处理调度推理结论(deepSeek) |
| | | // const dealResult = (conversations: any) => { |
| | | // const regex = /<think>(\n*)([\s\S]*?)(\n*)<\/think>(\n*)([\s\S]*)/; |
| | | // conversations.forEach((conversation) => { |
| | | // if(conversation.content.includes('<\/think>')) { |
| | | // conversation.thinkingFlag = false |
| | | // } else { |
| | | // conversation.thinkingFlag = true |
| | | // } |
| | | // const match = conversation.content.match(regex); |
| | | // if(match) { |
| | | // conversation.thinking = match[2]; |
| | | // conversation.conclusion = match[5] |
| | | // } |
| | | // }) |
| | | // } |
| | | |
| | | //处理调度推理结论(微调大模型) |
| | | const dealResult = (messages: any) => { |
| | | messages.forEach((message) => { |
| | |
| | | } else { |
| | | message.thinking = message.content |
| | | } |
| | | // 处理推理思路内容 |
| | | message.thinking = formatReasoningContent(message.thinking); |
| | | } |
| | | }) |
| | | } |
| | |
| | | position: absolute; |
| | | left: 320px; // 初始展开位置 |
| | | top: 40%; |
| | | z-index: 1000; |
| | | z-index: 1; |
| | | width: 20px; |
| | | height: 80px; |
| | | background: rgba(115, 196, 255, 0.5); |