TASK:LLM;
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user