提交 a6fddc46 作者: 925993793@qq.com

逻辑优化

上级 0c06ffd4
......@@ -75,7 +75,7 @@ public class LLmConfigController {
String eventId = eventLlmConfig.getEventId();
EventVO event = eventService.queryInfo(eventId);
String eventName = event.getEventName();
String content = "事件标题;" + eventName + "\n采集关键词:" + event.getKeywordsVO().getKeyword();
String content = "事件标题;" + eventName + "\n事件摘要:" + event.getEventDescribe();
//调用大模型更细结果
String llmResult = analysisService.llmResult(eventId,content, null, null, eventLlmConfig.getColumnCode());
EventAnalysisVersion eventAnalysisVersion = eventAnalysisVersionService.latestVersion(eventId);
......
......@@ -339,7 +339,7 @@ public class AnalysisServiceImpl implements AnalysisService {
params.put("eventName", event.getEventName());
params.put("eventSummary", event.getEventDescribe());
params.put("impactOutline", impact);
String impactDetail = llmService.model(llmConfig.getLlmName(), detailConfig.getLlmPrompt(), params.toJSONString());
String impactDetail = llmService.model(detailConfig.getLlmName(), detailConfig.getLlmPrompt(), params.toJSONString());
impact.put("impactDetail", impactDetail);
}
result = JSON.toJSONString(impactList);
......
......@@ -89,6 +89,9 @@ public class NetWorkEventTask {
if (CollectionUtils.isNotEmpty(finalList)) {
finalList.forEach(network -> network.setLatest(1));
String response = llmService.model(null, PROMPT, JSONObject.toJSONString(finalList));
if (response.startsWith("```json")) {
response = response.substring(7, response.length() - 3);
}
if (StringUtils.isNotEmpty(response)) {
try {
List<EventNetwork> hitList = JSON.parseArray(response, EventNetwork.class);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论