From 919ab515704d65d68ad9fd4a32af748f26638ea4 Mon Sep 17 00:00:00 2001 From: wenjinbo <599483010@qq.com> Date: Mon, 22 Sep 2025 12:06:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=B8=80=E4=BA=8B?= =?UTF-8?q?=E4=B8=80=E6=B5=81=E7=A8=8B=E5=85=83=E6=95=B0=E6=8D=AE=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=A4=B1=E8=B4=A5=EF=BC=8C=E6=B7=BB=E5=8A=A0=E8=AF=AD?= =?UTF-8?q?=E9=9F=B3=E8=BD=AC=E6=96=87=E5=AD=97=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chat-client/src/api/chat.ts | 11 +- .../views/chatweb/components/InputArea.vue | 290 +++++++++++++++++- .../brichat/controller/ChatController.java | 79 ++++- .../controller/KnowledgeBaseController.java | 22 +- .../brichat/service/dify/MetadataService.java | 2 +- .../dify/impl/DifyDatasetApiServiceImpl.java | 7 +- .../dify/impl/MetadataServiceImpl.java | 3 +- .../brichat/util/EsTDatasetFilesImporter.java | 5 +- .../main/resources/application-beijing.yml | 5 + .../src/main/resources/application-wuhan.yml | 3 + 10 files changed, 403 insertions(+), 24 deletions(-) diff --git a/chat-client/src/api/chat.ts b/chat-client/src/api/chat.ts index 6c91a8b..a29efaa 100644 --- a/chat-client/src/api/chat.ts +++ b/chat-client/src/api/chat.ts @@ -1,6 +1,7 @@ import request from '@/utils/request' import requestStream from '@/utils/requestStream' +import { fileUploadRequest } from '@/utils/request' // 聊天消息相关接口定义 @@ -84,4 +85,12 @@ export const stopMessagesStream = (chatType: Number,taskId: string, userId: stri userId } }) -} \ No newline at end of file +} + +export const voiceToText = (data: FormData) => { + return fileUploadRequest({ + url: '/brichat-service/chat/voiceToText', + method: 'post', + data + }) +} diff --git a/chat-client/src/views/chatweb/components/InputArea.vue b/chat-client/src/views/chatweb/components/InputArea.vue index 5aa212e..722ed92 100644 --- a/chat-client/src/views/chatweb/components/InputArea.vue +++ b/chat-client/src/views/chatweb/components/InputArea.vue @@ -24,6 +24,32 @@ :autosize="{ minRows: 1, maxRows: 4 }" > + + +