提交 b126f875 作者: 洪东保

代码优化

父级 ff305cbb
...@@ -84,6 +84,7 @@ public class FileProcessTask { ...@@ -84,6 +84,7 @@ public class FileProcessTask {
private String llmModel; private String llmModel;
private String llmBackModel; private String llmBackModel;
private String llmToken; private String llmToken;
private String llmBackToken;
private Integer llmMaxTokens; private Integer llmMaxTokens;
private Boolean finalRetry; //表示是兜底重试机制 private Boolean finalRetry; //表示是兜底重试机制
...@@ -323,7 +324,7 @@ public class FileProcessTask { ...@@ -323,7 +324,7 @@ public class FileProcessTask {
llmApiAddr, llmApiAddr,
llmToken, llmToken,
llmMaxTokens); llmMaxTokens);
LLMConfig backLLM = new LLMConfig(llmBackModel, llmApiAddr, llmToken, llmMaxTokens); LLMConfig backLLM = new LLMConfig(llmBackModel, llmApiAddr, llmBackToken, llmMaxTokens);
LLMResult llmResult = MeetingProcess.processMeeting(prompt, textContent,meetingDate,participantNames, baseLLM, Collections.singletonList(backLLM)); LLMResult llmResult = MeetingProcess.processMeeting(prompt, textContent,meetingDate,participantNames, baseLLM, Collections.singletonList(backLLM));
return llmResult; return llmResult;
// if (llmResult.success) { // if (llmResult.success) {
...@@ -569,7 +570,7 @@ public class FileProcessTask { ...@@ -569,7 +570,7 @@ public class FileProcessTask {
public FileProcessTask(List<String> recordFileIdList, String meetingRecordId, String meetingId, String subMeetingId, String savePath, Map<String, Object> metadata, public FileProcessTask(List<String> recordFileIdList, String meetingRecordId, String meetingId, String subMeetingId, String savePath, Map<String, Object> metadata,
MeetingInfoMapper meetingInfoMapper, MinioUtils minioUtils, RedisUtils redisUtils, EmailSender emailSender, MeetingInfoMapper meetingInfoMapper, MinioUtils minioUtils, RedisUtils redisUtils, EmailSender emailSender,
MeetingRecordTemplateMapper meetingRecordTemplateMapper, MeetingRecordTemplateService meetingRecordTemplateService, MeetTypeService meetTypeService, UserIdMapper userIdMapper, MeetingRecordTemplateMapper meetingRecordTemplateMapper, MeetingRecordTemplateService meetingRecordTemplateService, MeetTypeService meetTypeService, UserIdMapper userIdMapper,
String llmApiAddr, String llmModel, String llmBackModel, String llmToken, Integer llmMaxTokens, Boolean finalRetry, ProcessLogService processLogService, List<UserDTO.TemplateAuthorizedUserDTO> authorizedUsers, Map<String, String> tidWidRelations, String llmApiAddr, String llmModel, String llmBackModel, String llmToken, String llmBackToken, Integer llmMaxTokens, Boolean finalRetry, ProcessLogService processLogService, List<UserDTO.TemplateAuthorizedUserDTO> authorizedUsers, Map<String, String> tidWidRelations,
UserAdminConfig userAdminConfig, String applicationId, String fileDownloadPath, String permTenantId, UserAdminConfig userAdminConfig, String applicationId, String fileDownloadPath, String permTenantId,
String aesKey) { String aesKey) {
this.recordFileIdList = recordFileIdList; this.recordFileIdList = recordFileIdList;
...@@ -590,6 +591,7 @@ public class FileProcessTask { ...@@ -590,6 +591,7 @@ public class FileProcessTask {
this.llmModel = llmModel; this.llmModel = llmModel;
this.llmBackModel = llmBackModel; this.llmBackModel = llmBackModel;
this.llmToken = llmToken; this.llmToken = llmToken;
this.llmBackToken = llmBackToken;
this.llmMaxTokens = llmMaxTokens; this.llmMaxTokens = llmMaxTokens;
this.finalRetry = finalRetry; this.finalRetry = finalRetry;
this.processLogService = processLogService; this.processLogService = processLogService;
......
...@@ -47,6 +47,9 @@ public class FileProcessProducer { ...@@ -47,6 +47,9 @@ public class FileProcessProducer {
private String llmBackModel; private String llmBackModel;
@Value(value = "${llm.api-token}") @Value(value = "${llm.api-token}")
private String llmToken; private String llmToken;
@Value(value = "${llm.api-back-token}")
private String llmBackToken;
@Value(value = "${llm.api-max-tokens}") @Value(value = "${llm.api-max-tokens}")
private Integer llmMaxTokens; private Integer llmMaxTokens;
@Value(value = "${tencent.base-save-path}") @Value(value = "${tencent.base-save-path}")
...@@ -112,6 +115,7 @@ public class FileProcessProducer { ...@@ -112,6 +115,7 @@ public class FileProcessProducer {
llmModel, llmModel,
llmBackModel, llmBackModel,
llmToken, llmToken,
llmBackToken,
llmMaxTokens, llmMaxTokens,
finalRetry, finalRetry,
processLogService, processLogService,
......
...@@ -17,6 +17,7 @@ LLM_API_ADDR: https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions ...@@ -17,6 +17,7 @@ LLM_API_ADDR: https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions
LLM_API_MODEL: qwen3.5-plus LLM_API_MODEL: qwen3.5-plus
LLM_BACK_API_MODEL: qwen3-max LLM_BACK_API_MODEL: qwen3-max
LLM_API_TOKEN: sk-58046ac63cae4317b65fb151965169d1 LLM_API_TOKEN: sk-58046ac63cae4317b65fb151965169d1
LLM_BACK_API_TOKEN:
LLM_API_MAX_TOKENS: 16000 LLM_API_MAX_TOKENS: 16000
# prod # prod
...@@ -120,6 +121,7 @@ llm: ...@@ -120,6 +121,7 @@ llm:
api-model: ${LLM_API_MODEL} api-model: ${LLM_API_MODEL}
api-back-model: ${LLM_BACK_API_MODEL} api-back-model: ${LLM_BACK_API_MODEL}
api-token: ${LLM_API_TOKEN} api-token: ${LLM_API_TOKEN}
api-back-token: ${LLM_BACK_API_TOKEN}
api-max-tokens: ${LLM_API_MAX_TOKENS} api-max-tokens: ${LLM_API_MAX_TOKENS}
#解密key #解密key
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论