[fix][chat] The terms in the descriptor of the term no longer undergo descriptor mapping (#1897)

This commit is contained in:
lexluo09
2024-11-09 14:16:55 +08:00
committed by GitHub
parent c9c6dc4e44
commit d4a9d5a7e6
3 changed files with 8 additions and 4 deletions

View File

@@ -22,10 +22,10 @@ import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.List;
@Component
@Slf4j
@@ -61,10 +61,11 @@ public class MemoryReviewTask {
public void review() {
List<Agent> agentList = agentService.getAgents();
for (Agent agent : agentList) {
if(!agent.enableMemoryReview()){
if (!agent.enableMemoryReview()) {
continue;
}
ChatMemoryFilter chatMemoryFilter = ChatMemoryFilter.builder().agentId(agent.getId()).build();
ChatMemoryFilter chatMemoryFilter =
ChatMemoryFilter.builder().agentId(agent.getId()).build();
memoryService.getMemories(chatMemoryFilter).stream().forEach(memory -> {
try {
processMemory(memory, agent);