Commit 4428dadb authored by alex yao's avatar alex yao

优化记忆函数主键

parent 8f2a35c7
...@@ -31,7 +31,7 @@ public interface AgentApplicationInfoService { ...@@ -31,7 +31,7 @@ public interface AgentApplicationInfoService {
/** /**
* 应用预览 * 应用预览
*/ */
String callAgentApplication(String identifier, String largeModel, String[] unitIds, String agentSystem, String callAgentApplication(String agentId, String identifier, String largeModel, String[] unitIds, String agentSystem,
Integer[] knowledgeIds, Integer communicationTurn, Float topP, Float temperature, Integer[] knowledgeIds, Integer communicationTurn, Float topP, Float temperature,
List<Message> messages, List<Tool> tools, HttpServletResponse httpServletResponse) throws Exception; List<Message> messages, List<Tool> tools, HttpServletResponse httpServletResponse) throws Exception;
......
...@@ -347,7 +347,7 @@ public class AgentApplicationInfoRestImpl implements AgentApplicationInfoRest { ...@@ -347,7 +347,7 @@ public class AgentApplicationInfoRestImpl implements AgentApplicationInfoRest {
public List<AgentApplicationValueMemoryDto> getVariableList(String agentId) { public List<AgentApplicationValueMemoryDto> getVariableList(String agentId) {
List<AgentApplicationValueMemoryDto> result = new ArrayList<>(); List<AgentApplicationValueMemoryDto> result = new ArrayList<>();
BizAgentApplicationInfoEntity infoEntity = bizAgentApplicationInfoService.getByAgentId(agentId); BizAgentApplicationInfoEntity infoEntity = bizAgentApplicationInfoService.getByAgentId(agentId);
Map<Object, Object> map = GetValueMemory.get(agentId); Map<Object, Object> map = GetValueMemory.get(agentId + ":" + agentId);
List<Variable> variableStructure = infoEntity.getVariableStructure(); List<Variable> variableStructure = infoEntity.getVariableStructure();
if (MapUtils.isEmpty(map)) { if (MapUtils.isEmpty(map)) {
if (CollectionUtils.isEmpty(variableStructure)) { if (CollectionUtils.isEmpty(variableStructure)) {
......
...@@ -136,7 +136,7 @@ public class AgentApplicationServiceImpl implements AgentApplicationService { ...@@ -136,7 +136,7 @@ public class AgentApplicationServiceImpl implements AgentApplicationService {
outputRecord.setTimestamp(System.currentTimeMillis()); outputRecord.setTimestamp(System.currentTimeMillis());
//对话 //对话
String output = agentApplicationInfoService.callAgentApplication(dialogsId, infoEntity.getLargeModel(), String output = agentApplicationInfoService.callAgentApplication(agentId, dialogsId, infoEntity.getLargeModel(),
infoEntity.getUnitIds(), infoEntity.getAgentSystem(), kdIdList.toArray(new Integer[0]), infoEntity.getCommunicationTurn(), infoEntity.getUnitIds(), infoEntity.getAgentSystem(), kdIdList.toArray(new Integer[0]), infoEntity.getCommunicationTurn(),
infoEntity.getTopP(), infoEntity.getTemperature(), messages, tools, httpServletResponse); infoEntity.getTopP(), infoEntity.getTemperature(), messages, tools, httpServletResponse);
......
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