fix 舆情自动化代码
This commit is contained in:
@@ -9,5 +9,5 @@ public class DifyImageWorkFlow {
|
|||||||
|
|
||||||
private String type = "image";
|
private String type = "image";
|
||||||
|
|
||||||
private String url;
|
private String imageUrl;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ public class DiFyServiceImpl implements DiFyService{
|
|||||||
map.put("inputs",diFyReq.getInputs());
|
map.put("inputs",diFyReq.getInputs());
|
||||||
map.put("response_mode","blocking");
|
map.put("response_mode","blocking");
|
||||||
map.put("user",diFyReq.getUser());
|
map.put("user",diFyReq.getUser());
|
||||||
|
log.info("请求DiFy入参:{}",diFyReq.getInputs());
|
||||||
JSONObject difyResult = diFyFeign.runWorkflows("Bearer "+diFyReq.getFlowId(),map);
|
JSONObject difyResult = diFyFeign.runWorkflows("Bearer "+diFyReq.getFlowId(),map);
|
||||||
log.info("请求DiFy响应结果:{}",difyResult.toJSONString());
|
log.info("请求DiFy响应结果:{}",difyResult.toJSONString());
|
||||||
JSONObject data = difyResult.getJSONObject("data");
|
JSONObject data = difyResult.getJSONObject("data");
|
||||||
|
|||||||
@@ -104,12 +104,12 @@ public class MqMessageRecordServiceImpl extends ServiceImpl<MqMessageRecordMappe
|
|||||||
if (contentNode.getNodeType().equals(NodeTypeEnum.IMAGE.getCode())) {
|
if (contentNode.getNodeType().equals(NodeTypeEnum.IMAGE.getCode())) {
|
||||||
//构建图片分析请求对象
|
//构建图片分析请求对象
|
||||||
DifyImageWorkFlow diFyImageWorkFlow = new DifyImageWorkFlow();
|
DifyImageWorkFlow diFyImageWorkFlow = new DifyImageWorkFlow();
|
||||||
diFyImageWorkFlow.setUrl(contentNode.getNodeContent());
|
diFyImageWorkFlow.setImageUrl(contentNode.getNodeContent());
|
||||||
|
|
||||||
DiFyReq diFyImageReq = new DiFyReq();
|
DiFyReq diFyImageReq = new DiFyReq();
|
||||||
diFyImageReq.setUser(user);
|
diFyImageReq.setUser(user);
|
||||||
diFyImageReq.setFlowId(imageFlowId);
|
diFyImageReq.setFlowId(imageFlowId);
|
||||||
diFyImageReq.setInputs(diFyImageWorkFlow);
|
diFyImageReq.setInputs(JSON.toJSONString(diFyImageWorkFlow));
|
||||||
|
|
||||||
//调用dify图片分析workflow
|
//调用dify图片分析workflow
|
||||||
JSONObject difImageResult = (JSONObject) diFyService.getDiFyObject(diFyImageReq);
|
JSONObject difImageResult = (JSONObject) diFyService.getDiFyObject(diFyImageReq);
|
||||||
|
|||||||
Reference in New Issue
Block a user