(fix)(chat)Remove spaces when obtaining a MemoryReviewResult (#1594)

This commit is contained in:
xiuzhu9527
2024-08-26 10:27:08 +08:00
committed by GitHub
parent 3915d90eec
commit 5606633481
2 changed files with 14 additions and 2 deletions

View File

@@ -67,7 +67,7 @@ public class MemoryReviewTask {
Matcher matcher = OUTPUT_PATTERN.matcher(response);
if (matcher.find()) {
m.setLlmReviewRet(MemoryReviewResult.valueOf(matcher.group(1)));
m.setLlmReviewRet(MemoryReviewResult.getMemoryReviewResult(matcher.group(1)));
m.setLlmReviewCmt(matcher.group(2));
// directly enable memory if the LLM determines it positive
if (MemoryReviewResult.POSITIVE.equals(m.getLlmReviewRet())) {