|
@@ -117,6 +117,8 @@ export default {
|
|
if(answer_json.code == 1001){//缺少专利文件
|
|
if(answer_json.code == 1001){//缺少专利文件
|
|
this.result = answer_json
|
|
this.result = answer_json
|
|
this.$refs.errorTip.open(answer_json.data)
|
|
this.$refs.errorTip.open(answer_json.data)
|
|
|
|
+ }else if(answer_json.code == 1001){//请求超时
|
|
|
|
+ this.result = answer_json
|
|
}else if(answer_json.code == 200){
|
|
}else if(answer_json.code == 200){
|
|
this.queryConfessionSession(false,false,true)
|
|
this.queryConfessionSession(false,false,true)
|
|
}
|
|
}
|
|
@@ -149,6 +151,19 @@ export default {
|
|
//格式化AI答复
|
|
//格式化AI答复
|
|
formateAIAnswer(chat){
|
|
formateAIAnswer(chat){
|
|
let answer = chat.replace('null','')
|
|
let answer = chat.replace('null','')
|
|
|
|
+
|
|
|
|
+ // let regx1 = /<think>[\s\S]*<\/think>/g
|
|
|
|
+ // let regx2 = /<details style="color:gray;background-color: #f8f8f8;padding: 8px;border-radius: 4px;" open> <summary> Thinking... <\/summary>[\s\S]*<\/details>/g
|
|
|
|
+ // // let regx1 = new RegExp("<think>.*</think>", "g")
|
|
|
|
+ // // let regx2 = new RegExp('<details style="color:gray;background-color: #f8f8f8;padding: 8px;border-radius: 4px;" open> <summary> Thinking... </summary>.*</details>', "g")
|
|
|
|
+ // let text = answer.replace(regx1,'').replace(regx2,'')
|
|
|
|
+ // return [
|
|
|
|
+ // {
|
|
|
|
+ // type:'text',
|
|
|
|
+ // content:text.trim()
|
|
|
|
+ // }
|
|
|
|
+ // ]
|
|
|
|
+
|
|
let len = answer.length
|
|
let len = answer.length
|
|
|
|
|
|
let signs = [
|
|
let signs = [
|