Commit 3e64d624 authored by alex yao's avatar alex yao

优化记忆函数主键

parent 16ca8733
...@@ -224,7 +224,7 @@ public class AgentApplicationInfoRestImpl implements AgentApplicationInfoRest { ...@@ -224,7 +224,7 @@ public class AgentApplicationInfoRestImpl implements AgentApplicationInfoRest {
tools.add(tool); tools.add(tool);
//初始化变量函数 //初始化变量函数
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)) {
for (Variable variable : variableStructure) { for (Variable variable : variableStructure) {
...@@ -233,7 +233,7 @@ public class AgentApplicationInfoRestImpl implements AgentApplicationInfoRest { ...@@ -233,7 +233,7 @@ public class AgentApplicationInfoRestImpl implements AgentApplicationInfoRest {
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
jsonObject.put("contentName", key); jsonObject.put("contentName", key);
jsonObject.put("contentValue", variableDefault); jsonObject.put("contentValue", variableDefault);
LargeModelFunctionEnum.valueOf(functionName).getFunction().doFunction(jsonObject.toJSONString(), agentId); LargeModelFunctionEnum.valueOf(functionName).getFunction().doFunction(jsonObject.toJSONString(), agentId + ":" + agentId);
} }
} }
......
...@@ -387,7 +387,7 @@ public class AgentApplicationServiceImpl implements AgentApplicationService { ...@@ -387,7 +387,7 @@ public class AgentApplicationServiceImpl implements AgentApplicationService {
tools.add(tool); tools.add(tool);
//初始化变量函数 //初始化变量函数
Map<Object, Object> map = GetValueMemory.get(identifier); Map<Object, Object> map = GetValueMemory.get(identifier + ":" + infoEntity.getAgentId());
if (MapUtils.isEmpty(map)) { if (MapUtils.isEmpty(map)) {
List<Variable> variableStructure = infoEntity.getVariableStructure(); List<Variable> variableStructure = infoEntity.getVariableStructure();
for (Variable variable : variableStructure) { for (Variable variable : variableStructure) {
...@@ -396,7 +396,7 @@ public class AgentApplicationServiceImpl implements AgentApplicationService { ...@@ -396,7 +396,7 @@ public class AgentApplicationServiceImpl implements AgentApplicationService {
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
jsonObject.put("contentName", key); jsonObject.put("contentName", key);
jsonObject.put("contentValue", variableDefault); jsonObject.put("contentValue", variableDefault);
LargeModelFunctionEnum.valueOf(functionName).getFunction().doFunction(jsonObject.toJSONString(), identifier); LargeModelFunctionEnum.valueOf(functionName).getFunction().doFunction(jsonObject.toJSONString(), identifier + ":" + infoEntity.getAgentId());
} }
} }
} }
......
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