| | |
| | | import { ErrorCode } from '/@/utils/request'; |
| | | import { toMyFixed } from '/@/utils/util'; |
| | | import { findLast, orderBy } from 'lodash-es'; |
| | | import { getCurrentPosition } from '/@/utils/brower'; |
| | | const chatWidth = '75%'; |
| | | const voicePageIsShow = ref(false); |
| | | let isTalking = ref(false); |
| | |
| | | |
| | | const DEFAULT_SECTION_A_ID = 'knowledge_base'; |
| | | let questionRes = null; |
| | | |
| | | let position = null; |
| | | let finalCalcSectionAId = null; |
| | | const questionAi = async (text) => { |
| | | let judgeParams = null; |
| | |
| | | raw_mode: roomConfig.value?.[currentRouteId]?.isAnswerByLLM ?? false, |
| | | ...judgeParams, |
| | | } as any; |
| | | |
| | | if (position) { |
| | | const longitude = position.coords.longitude; |
| | | const latitude = position.coords.latitude; |
| | | params.cur_pos = [longitude, latitude].join(','); |
| | | } |
| | | |
| | | if (activeGroupType.value) { |
| | | params.group_type = activeGroupType.value; |
| | |
| | | ElMessage.warning('ai 正在回复中,请稍后尝试提问'); |
| | | return; |
| | | } |
| | | position = position ?? (await getCurrentPosition()); |
| | | |
| | | const isNewChat = messageList.value.length === 0; |
| | | if (isNewChat) { |