Commit 49a6d0d2 authored by alex yao's avatar alex yao

fix:【多模态调试】修复配置对话轮次不生效

parent d7416fe9
...@@ -21,6 +21,11 @@ public class AgentApplicationPreviewDto implements Serializable { ...@@ -21,6 +21,11 @@ public class AgentApplicationPreviewDto implements Serializable {
private List<String> fileUrls; private List<String> fileUrls;
/**
* 对话参考轮次
*/
private Integer communicationTurn;
/** /**
* 渠道来源 * 渠道来源
*/ */
...@@ -89,4 +94,12 @@ public class AgentApplicationPreviewDto implements Serializable { ...@@ -89,4 +94,12 @@ public class AgentApplicationPreviewDto implements Serializable {
public void setChannel(String channel) { public void setChannel(String channel) {
this.channel = channel; this.channel = channel;
} }
public Integer getCommunicationTurn() {
return communicationTurn;
}
public void setCommunicationTurn(Integer communicationTurn) {
this.communicationTurn = communicationTurn;
}
} }
...@@ -256,18 +256,19 @@ public class AgentApplicationInfoRestImpl implements AgentApplicationInfoRest { ...@@ -256,18 +256,19 @@ public class AgentApplicationInfoRestImpl implements AgentApplicationInfoRest {
Float topP = dto.getTopP() == null ? infoEntity.getTopP() : dto.getTopP(); Float topP = dto.getTopP() == null ? infoEntity.getTopP() : dto.getTopP();
Float temperature = dto.getTemperature() == null ? infoEntity.getTemperature() : dto.getTemperature(); Float temperature = dto.getTemperature() == null ? infoEntity.getTemperature() : dto.getTemperature();
String agentSystem = StringUtils.isBlank(dto.getAgentSystem()) ? infoEntity.getAgentSystem() : dto.getAgentSystem(); String agentSystem = StringUtils.isBlank(dto.getAgentSystem()) ? infoEntity.getAgentSystem() : dto.getAgentSystem();
Integer communicationTurn = dto.getCommunicationTurn() == null ? infoEntity.getCommunicationTurn(): dto.getCommunicationTurn();
// 判断是否调用function // 判断是否调用function
//计算扣分数 //计算扣分数
CheckPluginUseEntity checkPluginUseEntity = AgentApplicationTools.checkPluginUse(dto.getMessages(), tools,fileUrls,imageUrls); CheckPluginUseEntity checkPluginUseEntity = AgentApplicationTools.checkPluginUse(dto.getMessages(), tools,fileUrls,imageUrls);
Long pointDeductionNum = pointDeductionRulesService.calculatePointDeductionNum(model, infoEntity.getCommunicationTurn(), checkPluginUseEntity.getDeductionTools()); Long pointDeductionNum = pointDeductionRulesService.calculatePointDeductionNum(model, communicationTurn, checkPluginUseEntity.getDeductionTools());
AgentUseModifyEventInfo agentUseModifyEventInfo = new AgentUseModifyEventInfo(); AgentUseModifyEventInfo agentUseModifyEventInfo = new AgentUseModifyEventInfo();
agentUseModifyEventInfo.setAgentId(agentId); agentUseModifyEventInfo.setAgentId(agentId);
agentUseModifyEventInfo.setIsPublish(CommonConstant.IsDeleted.N); agentUseModifyEventInfo.setIsPublish(CommonConstant.IsDeleted.N);
reduceSn = memberEquityService.reducePoint(userBaseEntity.getUserId(), pointDeductionNum, ModifyEventEnum.use, agentUseModifyEventInfo); reduceSn = memberEquityService.reducePoint(userBaseEntity.getUserId(), pointDeductionNum, ModifyEventEnum.use, agentUseModifyEventInfo);
//调用应用服务 //调用应用服务
agentApplicationInfoService.callAgentApplication(agentId, dialogueId, model, agentApplicationInfoService.callAgentApplication(agentId, dialogueId, model,
agentSystem, kdIds.toArray(new Integer[0]), infoEntity.getCommunicationTurn(), topP, agentSystem, kdIds.toArray(new Integer[0]), communicationTurn, topP,
temperature, dto.getMessages(), tools, checkPluginUseEntity.getFunctionCallResult(), dto.getFileUrls(), true, imageUrls, httpServletResponse); temperature, dto.getMessages(), tools, checkPluginUseEntity.getFunctionCallResult(), dto.getFileUrls(), true, imageUrls, httpServletResponse);
//数据采集 //数据采集
if (StringUtils.isBlank(dto.getChannel())) { if (StringUtils.isBlank(dto.getChannel())) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment