提交 48b759df 作者: duanxincheng

claude升级成3.7,历史会议只能看到自己主持的会议修复

父级 fb47d3e3
...@@ -409,7 +409,7 @@ public class FileProcessTask { ...@@ -409,7 +409,7 @@ public class FileProcessTask {
private String choiceTemplateType(String subject,String textContent) { private String choiceTemplateType(String subject,String textContent) {
String token = "AKIAXFAXF62IWJXGLVEE.LnKInaahcMZG9zLsGMH3nTLOw3S3lK5Vcu0+ifnO"; String token = "AKIAXFAXF62IWJXGLVEE.LnKInaahcMZG9zLsGMH3nTLOw3S3lK5Vcu0+ifnO";
String apiAddr = llmApiAddr + "/llm/sse-invoke"; String apiAddr = llmApiAddr + "/llm/sse-invoke";
String model = "anthropic.claude-3-5-sonnet-20240620-v1:0"; String model = "anthropic.claude-3-7-sonnet-20240620-v1:0";
int maxTokens = 5000; int maxTokens = 5000;
String prompt = "请先对以下会议转写记录进行简要总结(不超过200字),然后根据会议主题以及总结内容判断该会议最可能属于哪种类型:\\n\\n会议主题: {0}\\n会议转写记录: {1}\\n\\n第一步:请简要总结会议的主要内容和目的(不超过200字)。\\n\\n第二步:根据上述总结和会议主题,将会议分类为以下类型之一:\\n1. 项目沟通会 - 与具体项目进展、问题讨论相关的会议\\n2. 重要会议 - 高层决策、战略规划等重要会议\\n3. 启动会 - 项目启动、活动筹备等初始会议\\n4. 其他 - 不符合以上任何分类\\n\\n分类权重判断规则:\\n- 基础权重分配:会议内容总结(70%)、会议主题(30%)\\n- 会议主题权重动态调整:\\n * 如果会议主题包含明确分类关键词(如\\\"启动会\\\"、\\\"项目沟通\\\"、\\\"战略决策\\\"等),则会议主题权重提升至60%,总结内容权重调整为40%\\n * 如果会议主题过于简单或模糊(如仅包含\\\"沟通\\\"、\\\"讨论\\\"、\\\"会议\\\"等通用词),则会议主题权重降低至15%,总结内容权重提升至85%\\n- 一致性判断:如果会议主题和总结内容指向不同分类,优先采用内容总结的分类,除非会议主题非常明确且规范\\n\\n输出格式:\\n请只返回分类名称(如\\\"项目沟通会\\\"),不要包含其他内容(如生成的会议总结等)。"; String prompt = "请先对以下会议转写记录进行简要总结(不超过200字),然后根据会议主题以及总结内容判断该会议最可能属于哪种类型:\\n\\n会议主题: {0}\\n会议转写记录: {1}\\n\\n第一步:请简要总结会议的主要内容和目的(不超过200字)。\\n\\n第二步:根据上述总结和会议主题,将会议分类为以下类型之一:\\n1. 项目沟通会 - 与具体项目进展、问题讨论相关的会议\\n2. 重要会议 - 高层决策、战略规划等重要会议\\n3. 启动会 - 项目启动、活动筹备等初始会议\\n4. 其他 - 不符合以上任何分类\\n\\n分类权重判断规则:\\n- 基础权重分配:会议内容总结(70%)、会议主题(30%)\\n- 会议主题权重动态调整:\\n * 如果会议主题包含明确分类关键词(如\\\"启动会\\\"、\\\"项目沟通\\\"、\\\"战略决策\\\"等),则会议主题权重提升至60%,总结内容权重调整为40%\\n * 如果会议主题过于简单或模糊(如仅包含\\\"沟通\\\"、\\\"讨论\\\"、\\\"会议\\\"等通用词),则会议主题权重降低至15%,总结内容权重提升至85%\\n- 一致性判断:如果会议主题和总结内容指向不同分类,优先采用内容总结的分类,除非会议主题非常明确且规范\\n\\n输出格式:\\n请只返回分类名称(如\\\"项目沟通会\\\"),不要包含其他内容(如生成的会议总结等)。";
//占位符信息替换 //占位符信息替换
...@@ -455,7 +455,7 @@ public class FileProcessTask { ...@@ -455,7 +455,7 @@ public class FileProcessTask {
// String ret = call_llm(apiAddr, model, token, messages, maxTokens); // String ret = call_llm(apiAddr, model, token, messages, maxTokens);
// String model = "arn:aws:bedrock:us-east-1:491822380689:inference-profile/us.anthropic.claude-3-7-sonnet-20250219-v1:0"; // String model = "arn:aws:bedrock:us-east-1:491822380689:inference-profile/us.anthropic.claude-3-7-sonnet-20250219-v1:0";
String model = "anthropic.claude-3-5-sonnet-20240620-v1:0"; String model = "anthropic.claude-3-7-sonnet-20240620-v1:0";
LLMConfig baseLLM = new LLMConfig(model, LLMConfig baseLLM = new LLMConfig(model,
llmApiAddr + "/llm/sse-invoke", llmApiAddr + "/llm/sse-invoke",
"Bearer AKIAXFAXF62IWJXGLVEE.LnKInaahcMZG9zLsGMH3nTLOw3S3lK5Vcu0+ifnO", "Bearer AKIAXFAXF62IWJXGLVEE.LnKInaahcMZG9zLsGMH3nTLOw3S3lK5Vcu0+ifnO",
......
...@@ -3,6 +3,7 @@ package com.cmeeting.mapper.primary; ...@@ -3,6 +3,7 @@ package com.cmeeting.mapper.primary;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cmeeting.pojo.UserId; import com.cmeeting.pojo.UserId;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
...@@ -14,4 +15,6 @@ public interface UserIdMapper extends BaseMapper<UserId> { ...@@ -14,4 +15,6 @@ public interface UserIdMapper extends BaseMapper<UserId> {
void updateUser(UserId user); void updateUser(UserId user);
String getWidByTid(String operatorUserId); String getWidByTid(String operatorUserId);
String getTidByWid(@Param("wid")String wid);
} }
...@@ -20,6 +20,7 @@ import com.cmeeting.ad.util.SecurityUtil; ...@@ -20,6 +20,7 @@ import com.cmeeting.ad.util.SecurityUtil;
import com.cmeeting.log.service.ProcessLogService; import com.cmeeting.log.service.ProcessLogService;
import com.cmeeting.mapper.primary.MeetingInfoMapper; import com.cmeeting.mapper.primary.MeetingInfoMapper;
import com.cmeeting.mapper.primary.MeetingRecordTemplateMapper; import com.cmeeting.mapper.primary.MeetingRecordTemplateMapper;
import com.cmeeting.mapper.primary.UserIdMapper;
import com.cmeeting.pojo.MeetingInfo; import com.cmeeting.pojo.MeetingInfo;
import com.cmeeting.pojo.MeetingRecordTemplate; import com.cmeeting.pojo.MeetingRecordTemplate;
import com.cmeeting.service.MeetingInfoService; import com.cmeeting.service.MeetingInfoService;
...@@ -87,12 +88,21 @@ public class MeetingInfoServiceImpl extends ServiceImpl<MeetingInfoMapper, Meeti ...@@ -87,12 +88,21 @@ public class MeetingInfoServiceImpl extends ServiceImpl<MeetingInfoMapper, Meeti
private MeetingRecordTemplateMapper meetingRecordTemplateMapper; private MeetingRecordTemplateMapper meetingRecordTemplateMapper;
@Resource @Resource
private MeetingInfoMapper meetingInfoMapper; private MeetingInfoMapper meetingInfoMapper;
@Resource
private UserIdMapper userIdMapper;
@Override @Override
public IPage<MeetingInfo> getPage(MeetingInfoVO vo) { public IPage<MeetingInfo> getPage(MeetingInfoVO vo) {
RobotSecurityUser user = SecurityUtil.getUser(); RobotSecurityUser user = SecurityUtil.getUser();
vo.setUserId(user.getId()); String userId = user.getId();
//根据员工号获取腾会uid
String tid = userIdMapper.getTidByWid(userId);
if(StringUtils.isEmpty(tid)){
log.error("获取历史会议列表失败:根据员工号"+userId+"获取腾会uid失败");
return new Page<>(0,0);
}
LambdaQueryWrapper<MeetingInfo> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<MeetingInfo> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(MeetingInfo::getHostUid,tid);
queryWrapper.like(StringUtils.isNotEmpty(vo.getSubject()),MeetingInfo::getSubject,vo.getSubject()); queryWrapper.like(StringUtils.isNotEmpty(vo.getSubject()),MeetingInfo::getSubject,vo.getSubject());
queryWrapper.between(vo.getStartTime() != null,MeetingInfo::getStartTime,vo.getStartTime(),vo.getEndTime()); queryWrapper.between(vo.getStartTime() != null,MeetingInfo::getStartTime,vo.getStartTime(),vo.getEndTime());
IPage<MeetingInfo> resultPage = mapper.selectPage(new Page<>(vo.getCurrent(), vo.getSize()), queryWrapper); IPage<MeetingInfo> resultPage = mapper.selectPage(new Page<>(vo.getCurrent(), vo.getSize()), queryWrapper);
...@@ -263,7 +273,7 @@ public class MeetingInfoServiceImpl extends ServiceImpl<MeetingInfoMapper, Meeti ...@@ -263,7 +273,7 @@ public class MeetingInfoServiceImpl extends ServiceImpl<MeetingInfoMapper, Meeti
//将文件传送给大模型处理 //将文件传送给大模型处理
String token = "AKIAXFAXF62IWJXGLVEE.LnKInaahcMZG9zLsGMH3nTLOw3S3lK5Vcu0+ifnO"; String token = "AKIAXFAXF62IWJXGLVEE.LnKInaahcMZG9zLsGMH3nTLOw3S3lK5Vcu0+ifnO";
String apiAddr = llmApiAddr + "/llm/sse-invoke"; String apiAddr = llmApiAddr + "/llm/sse-invoke";
String model = "anthropic.claude-3-5-sonnet-20240620-v1:0"; String model = "anthropic.claude-3-7-sonnet-20240620-v1:0";
int maxTokens = 5000; int maxTokens = 5000;
List<Message> messages = new ArrayList<>(); List<Message> messages = new ArrayList<>();
......
...@@ -189,7 +189,7 @@ public class RecordTemplatePermissionServiceImpl extends ServiceImpl<RecordTempl ...@@ -189,7 +189,7 @@ public class RecordTemplatePermissionServiceImpl extends ServiceImpl<RecordTempl
} }
} }
String model = "anthropic.claude-3-5-sonnet-20240620-v1:0"; String model = "anthropic.claude-3-7-sonnet-20240620-v1:0";
LLMConfig baseLLM = new LLMConfig(model, LLMConfig baseLLM = new LLMConfig(model,
llmApiAddr + "/llm/sse-invoke", llmApiAddr + "/llm/sse-invoke",
"Bearer AKIAXFAXF62IWJXGLVEE.LnKInaahcMZG9zLsGMH3nTLOw3S3lK5Vcu0+ifnO", "Bearer AKIAXFAXF62IWJXGLVEE.LnKInaahcMZG9zLsGMH3nTLOw3S3lK5Vcu0+ifnO",
......
...@@ -28,5 +28,8 @@ ...@@ -28,5 +28,8 @@
<select id="getWidByTid" resultType="java.lang.String"> <select id="getWidByTid" resultType="java.lang.String">
select wid from userid WHERE tid = #{operatorUserId} select wid from userid WHERE tid = #{operatorUserId}
</select> </select>
<select id="getTidByWid" resultType="java.lang.String">
select tid from userid WHERE wid = #{wid}
</select>
</mapper> </mapper>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论