|
@ -1187,7 +1187,7 @@ watch( |
|
|
|
|
|
|
|
|
const processedContent = marked(AIcontent.value); |
|
|
const processedContent = marked(AIcontent.value); |
|
|
const katexRegex = /\$\$(.*?)\$\$/g; |
|
|
const katexRegex = /\$\$(.*?)\$\$/g; |
|
|
const aiContent = processedContent.replace( |
|
|
|
|
|
|
|
|
let aiContent = processedContent.replace( |
|
|
katexRegex, |
|
|
katexRegex, |
|
|
(match, formula) => { |
|
|
(match, formula) => { |
|
|
try { |
|
|
try { |
|
@ -1198,14 +1198,21 @@ watch( |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
); |
|
|
); |
|
|
console.log(aiContent, "aiContent"); |
|
|
|
|
|
|
|
|
console.log(AIcontent, "AIcontent"); |
|
|
|
|
|
|
|
|
chatStore.messages.push({ |
|
|
|
|
|
|
|
|
if (result.code == 406) { |
|
|
|
|
|
AIcontent.value = `<p>尊敬的用户,目前您的token余额为0,系统将无法处理您的搜索请求,您可以补充token后再进行搜索。token兑换的入口在右上角“<span style="color:blue;cursor:pointer;border-bottom:1px solid blue" onclick="window.showCountHandler()">获取token次数</span>”,点击即可操作哦~</p>`; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const aiMsg = { |
|
|
class: "ing", |
|
|
class: "ing", |
|
|
type: "ing", |
|
|
type: "ing", |
|
|
flag: flag, |
|
|
flag: flag, |
|
|
content: AIcontent, |
|
|
content: AIcontent, |
|
|
}); |
|
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
chatStore.messages.push(aiMsg); |
|
|
|
|
|
|
|
|
chatStore.isLoading = false; |
|
|
chatStore.isLoading = false; |
|
|
chatStore.chatInput = false; |
|
|
chatStore.chatInput = false; |
|
|