TASK:LLM;

This commit is contained in:
shahaibo
2025-05-20 14:31:05 +08:00
parent f1adbb4da7
commit b030e9c09b

View File

@@ -152,10 +152,11 @@ public class LLMServiceImpl implements LLMService {
responseContentBuilder = new StringBuilder();
}
JSONObject toolsData = json.getJSONObject("tools_data");
if (Objects.nonNull(toolsData)) {
boolean color = true;
ReceiveDesignParam receiveDesignParam = JSONObject.parseObject(JSONObject.toJSONString(toolsData), ReceiveDesignParam.class);
receiveDesignParam.setProjectId(projectId);
designService.receiveDesignParams(receiveDesignParam);
boolean color = true;
for (ReceiveCollectionElement receiveCollectionElement : receiveDesignParam.getReceiveCollectionElementList()) {
if (!StringUtils.isEmpty(receiveCollectionElement.getUrl())) {
color = false;
@@ -164,7 +165,6 @@ public class LLMServiceImpl implements LLMService {
}
String jsonString = JSONObject.toJSONString(receiveDesignParam);
json.put("tools_data", jsonString);
ChatMessage systemImage = new ChatMessage();
systemImage.setRole("system");
if (color) {
@@ -178,7 +178,7 @@ public class LLMServiceImpl implements LLMService {
systemImage.setContent(JSONObject.toJSONString(receiveDesignParam.getReceiveCollectionElementList()));
systemImage.setAccountId(accountId);
chatMessageMapper.insert(systemImage);
}
emitter.send(json.toJSONString());
}
}