| | |
| | | raw_mode: roomConfig.value?.[currentRouteId]?.isAnswerByLLM ?? false, |
| | | ...judgeParams, |
| | | } as any; |
| | | const formDataParams = toFormData(params); |
| | | for (const item of attachFileList.value) { |
| | | formDataParams.append('files', item.file); |
| | | if(businessTableData.value?.length > 0) { |
| | | params.tables = JSON.stringify(businessTableData.value); |
| | | } |
| | | |
| | | // if (!position) { |
| | | // const loadingInstance = ElLoadingService({ |
| | | // text: '获取位置中...', |
| | |
| | | params.sample_id = currentSampleId; |
| | | currentSampleId = ''; |
| | | } |
| | | |
| | | const formDataParams = toFormData(params); |
| | | for (const item of attachFileList.value) { |
| | | formDataParams.append('files', item.file); |
| | | } |
| | | let lastTimestamp = new Date().getTime(); |
| | | questionRes = {}; |
| | | let lastIsResult = false; |
| | |
| | | return isEmpty; |
| | | }; |
| | | questionStreamByPost( |
| | | params, |
| | | formDataParams, |
| | | (chunkRes) => { |
| | | Logger.info('chunk response:\n\n' + JSON.stringify(chunkRes)); |
| | | if (chunkRes.mode === 'result') { |
| | |
| | | const content = parseContent(questionRes, true); |
| | | return content; |
| | | }; |
| | | |
| | | const playBarRef = useCompRef(PlayBar); |
| | | const businessTableData = computed(() => playBarRef.value?.businessTableData ?? []); |
| | | const clearMessageContent = () => |
| | | (messageContent.value = { |
| | | type: AnswerType.Text, |
| | | values: '', |
| | | }); |
| | | playBarRef.value?.clearFileList(); |
| | | playBarRef.value?.clearBusinessTable(); |
| | | |
| | | let currentSampleId = ''; |
| | | |
| | |
| | | messageContent.value.values = content; |
| | | }; |
| | | //#endregion |
| | | const playBarRef = useCompRef(PlayBar); |
| | | //用户问题设置为常用语 |
| | | const setCommonPhraseClick = (item) => { |
| | | playBarRef.value.addPhrase(item); |