| | |
| | | }; |
| | | |
| | | break; |
| | | case AnswerType.Report: |
| | | case AnswerType.Summary: |
| | | content = { |
| | | type: AnswerType.Summary, |
| | | values: res.summary?.map((item) => { |
| | | item.reportIsShow = reportIsShow; |
| | | return item; |
| | | }), |
| | | }; |
| | | if (res.answer_type === AnswerType.Report) { |
| | | content = { |
| | | type: AnswerType.Summary, |
| | | values: res.reports?.[0]?.summary, |
| | | }; |
| | | } else { |
| | | content = { |
| | | type: AnswerType.Summary, |
| | | values: res.summary?.map((item) => { |
| | | item.reportIsShow = reportIsShow; |
| | | return item; |
| | | }), |
| | | }; |
| | | } |
| | | break; |
| | | case AnswerType.Url: |
| | | content = { |
| | |
| | | // queryProcess(); |
| | | resetStep(); |
| | | let lastTimestamp = new Date().getTime(); |
| | | questionRes = {}; |
| | | questionRes = {}; |
| | | |
| | | const resultP = new Promise((resolve, reject) => { |
| | | const currentSource = axios.CancelToken.source(); |
| | |
| | | scrollToBottom(); |
| | | }, 300); |
| | | } catch (error: any) { |
| | | console.log("🚀 ~ error:", error) |
| | | // appendLastMessageContent({ |
| | | // type: AnswerType.Text, |
| | | // values: '发生错误!', |
| | |
| | | : { |
| | | historyId: item.answer?.history_id, |
| | | role: RoleEnum.assistant, |
| | | content: parseAnswerContent(item.answer), |
| | | content: parseAnswerContent(item?.answer), |
| | | state: item.answer_state, |
| | | sectionAId: mapUser?.section_a_id, |
| | | createTime: answerTime, |
| | | stepList: convertProcessToStep(item?.answer?.exec_process), |
| | | stepList: convertProcessToStep(item?.answer?.reports?.[0]?.exec_process), |
| | | stepIsShow: false, |
| | | isStopMsg: false, |
| | | |
| | |
| | | historyId: msgValue.history_id, |
| | | role: RoleEnum.assistant, |
| | | content: parseAnswerContent(msgValue), |
| | | stepList: convertProcessToStep(msgValue.exec_process), |
| | | stepList: convertProcessToStep(msgValue?.reports?.[0]?.exec_process), |
| | | stepIsShow: false, |
| | | isStopMsg: false, |
| | | |
| | |
| | | import NormalTextCom from '../chatComponents/normalTextCom/NormalTextCom.vue'; |
| | | import knowledgeCom from '../chatComponents/knowledgeCom/KnowledgeCom.vue'; |
| | | import SummaryCom from '../chatComponents/summaryCom/SummaryCom.vue'; |
| | | import ReportCom from '../chatComponents/reportCom/ReportCom.vue'; |
| | | |
| | | import assistantPic from '/static/images/role/assistant-200x192.png'; |
| | | import userPic from '/static/images/role/user-200x206.png'; |
| | |
| | | Summary = 'summary', |
| | | Url = 'url', |
| | | Map = 'map', |
| | | // Report = 'report', |
| | | Report = 'report_list', |
| | | } |
| | | |
| | | export const answerTypeMapCom = { |
| | |
| | | [AnswerType.RecordSet]: RecordSetCom, |
| | | [AnswerType.Text]: NormalTextCom, |
| | | [AnswerType.Summary]: SummaryCom, |
| | | // [AnswerType.Report]: ReportCom, |
| | | }; |
| | | |
| | | export const enum RoleEnum { |
| | |
| | | Result = 'result', |
| | | } |
| | | type SubStep = { |
| | | data:any; |
| | | data: any; |
| | | type: MultiChatType; |
| | | }; |
| | | |