日志优化

topo_dev
DESKTOP-DDTUS3E\yaxin 8 months ago
parent 42ba581ea6
commit cd167eb4bd

@ -151,8 +151,8 @@ public class LLMExtractServiceImpl implements LLMExtractService {
log.info("属性提取请求\n:{}", prompt); log.info("属性提取请求\n:{}", prompt);
ChatResponse call = ollamaChatClient.call(new Prompt(new UserMessage(prompt))); ChatResponse call = ollamaChatClient.call(new Prompt(new UserMessage(prompt)));
String content = call.getResult().getOutput().getContent(); String content = call.getResult().getOutput().getContent();
log.info("属性提取结果: {}", content);
JSONObject jsonObject = new JSONObject(content); JSONObject jsonObject = new JSONObject(content);
log.info("属性提取结果: {}", jsonObject);
List<NotePromptExtractAttributesDto> extractAttributesList = LLMExtractDto.getExtractAttributes(); List<NotePromptExtractAttributesDto> extractAttributesList = LLMExtractDto.getExtractAttributes();
extractAttributesMap.forEach((key, value) -> { extractAttributesMap.forEach((key, value) -> {
String attrValue = jsonObject.optString(key); String attrValue = jsonObject.optString(key);

@ -51,7 +51,7 @@ public class CalculationUtil {
} else if (LOGIC_OR.equals(logic)) { } else if (LOGIC_OR.equals(logic)) {
operator = " or "; operator = " or ";
} else { } else {
throw new IllegalArgumentException("Invalid logic value: [" + operator + "], use 1 for AND, 2 for OR."); throw new IllegalArgumentException("Invalid logic value: [" + logic + "], use 1 for AND, 2 for OR.");
} }
// 构建表达式 // 构建表达式

Loading…
Cancel
Save