From 93900308e0ae7bb135e8c3d13c4a230bfdadd0d1 Mon Sep 17 00:00:00 2001 From: chenhao Date: Mon, 6 Jul 2026 10:44:33 +0800 Subject: [PATCH] =?UTF-8?q?feat(LLM=E4=BB=BB=E5=8A=A1):=E6=80=BB=E7=BB=93?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E6=B7=BB=E5=8A=A0=E8=B6=85=E6=97=B6=E6=97=B6?= =?UTF-8?q?=E9=97=B4=20=20=20=E9=98=B2=E6=AD=A2llm=E6=AD=BB=E5=BE=AA?= =?UTF-8?q?=E7=8E=AF=E4=BB=BB=E5=8A=A1=E4=B8=80=E7=9B=B4=E4=B8=8D=E7=BB=93?= =?UTF-8?q?=E6=9D=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/imeeting/service/biz/impl/AiTaskServiceImpl.java | 2 ++ .../service/biz/impl/MeetingTranscriptChapterServiceImpl.java | 3 +++ 2 files changed, 5 insertions(+) diff --git a/backend/src/main/java/com/imeeting/service/biz/impl/AiTaskServiceImpl.java b/backend/src/main/java/com/imeeting/service/biz/impl/AiTaskServiceImpl.java index d8e528c..cfe86f9 100644 --- a/backend/src/main/java/com/imeeting/service/biz/impl/AiTaskServiceImpl.java +++ b/backend/src/main/java/com/imeeting/service/biz/impl/AiTaskServiceImpl.java @@ -79,6 +79,7 @@ public class AiTaskServiceImpl extends ServiceImpl impleme private static final Duration ASR_SUBMIT_REQUEST_TIMEOUT = Duration.ofSeconds(30); private static final Duration ASR_QUERY_REQUEST_TIMEOUT = Duration.ofSeconds(30); + private static final Duration LLM_REQUEST_TIMEOUT = Duration.ofSeconds(1800); private static final String DISPATCH_MODE_PARALLEL = "PARALLEL"; private static final String DISPATCH_MODE_SERIAL = "SERIAL"; private static final String TENCENT_PROVIDER = "tencent"; @@ -1273,6 +1274,7 @@ public class AiTaskServiceImpl extends ServiceImpl impleme .header("Accept", "application/json") .header("Authorization", "Bearer " + llmModel.getApiKey()) .POST(HttpRequest.BodyPublishers.ofString(requestBody, StandardCharsets.UTF_8)) + .timeout(LLM_REQUEST_TIMEOUT) .build(); HttpResponse response = httpClient.send(request, HttpResponse.BodyHandlers.ofString()); diff --git a/backend/src/main/java/com/imeeting/service/biz/impl/MeetingTranscriptChapterServiceImpl.java b/backend/src/main/java/com/imeeting/service/biz/impl/MeetingTranscriptChapterServiceImpl.java index 4de2ffc..c44148b 100644 --- a/backend/src/main/java/com/imeeting/service/biz/impl/MeetingTranscriptChapterServiceImpl.java +++ b/backend/src/main/java/com/imeeting/service/biz/impl/MeetingTranscriptChapterServiceImpl.java @@ -61,6 +61,7 @@ import java.util.stream.Collectors; @RequiredArgsConstructor public class MeetingTranscriptChapterServiceImpl implements MeetingTranscriptChapterService { + private static final Long TIME_OUT_SECOND = 1800L; private static final String SOURCE_TYPE_CHAPTER_VERSION = "CHAPTER_VERSION"; private static final String SOURCE_TYPE_RAW_FALLBACK = "RAW_FALLBACK"; private static final String GENERATION_MODE_INTERNAL = "INTERNAL_LLM"; @@ -240,6 +241,7 @@ public class MeetingTranscriptChapterServiceImpl implements MeetingTranscriptCha return source; } + @Override public MeetingTranscriptChapterVersion getCurrentVersion(Long meetingId) { return findCurrentVersion(meetingId); } @@ -346,6 +348,7 @@ public class MeetingTranscriptChapterServiceImpl implements MeetingTranscriptCha .header("Accept", "application/json") .header("Authorization", "Bearer " + llmModel.getApiKey()) .POST(HttpRequest.BodyPublishers.ofString(payload, StandardCharsets.UTF_8)) + .timeout(Duration.ofSeconds(TIME_OUT_SECOND)) .build(); HttpResponse response = httpClient.send(request, HttpResponse.BodyHandlers.ofString()); if (response.statusCode() != 200) {