| | |
| | | const streamStr = ref(''); |
| | | const inputMsg = ref(''); |
| | | const activeSessionId = ref(''); |
| | | const conversation_id = ref(''); |
| | | const fieldNames = { value: 'id', label: 'name' }; |
| | | const agentObj = reactive({}); |
| | | const agentList = ref([]); |
| | |
| | | if(errors) return; |
| | | console.log(agentObj, 'agentObj'); |
| | | let chatData = { |
| | | id:agentObj.id, |
| | | conversation_id:agentObj.id, |
| | | id:conversation_id.value, |
| | | conversation_id:conversation_id.value, |
| | | name: from.name |
| | | } |
| | | const { code, data } = await addSessionApi(chatData); |
| | |
| | | }); |
| | | // console.log(res,'agentSet'); |
| | | if (res.code == 0) { |
| | | conversation_id.value = res.data.conversation_id; |
| | | agentReset(); |
| | | } |
| | | } |
| | |
| | | |
| | | // 历史记录跳转获取agent会话详情 |
| | | const querySessionDetail = async (session) => { |
| | | activeSessionId.value = session.id; |
| | | conversation_id.value = session.id; |
| | | from.name = session.name; |
| | | const { code, data } = await getSessionDetailsApi(session.id); |
| | | if (code == 200) { |