Commit 271fb965 authored by alex yao's avatar alex yao

feat:关闭Agent应用 长期记忆和结构化记忆的有效期

parent 844a579a
......@@ -31,7 +31,7 @@ public class SetLongMemoryFunction extends AbstractLargeModelFunction {
.parameters(new Parameters("object").addProperties("content", new Properties("string", "内容的详细说明")))
.build();
private final Long expireTime = 30 * 60 * 24L; // 30天有效期
// private final Long expireTime = 30 * 60 * 24L; // 30天有效期
@Resource
......@@ -56,7 +56,7 @@ public class SetLongMemoryFunction extends AbstractLargeModelFunction {
// 提取 content
String contents = jsonObject.getStr("content");
String contentKey = SetLongMemoryConstants.REDIS_PREFIX + key;
redisService.hset(contentKey, DateUtils.getCurrTime(), contents, expireTime);
redisService.hset(contentKey, DateUtils.getCurrTime(), contents);
return "SUCCESS";
}
......
......@@ -65,9 +65,7 @@ public class MemoryVariableWriterFunction extends AbstractLargeModelFunction {
} else {
setMap(new JSONObject(content), result);
}
// 30天有效期
long expireTime = 30 * 60 * 24L;
redisService.hmset(contentKey, result, expireTime);
redisService.hmset(contentKey, result);
return "SUCCESS";
}
......
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