fix 舆情自动化图片分析代码
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
package com.volvo.ai.analytic.center.service.impl;
|
package com.volvo.ai.analytic.center.service.impl;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.volvo.ai.analytic.center.dto.req.DiFyReq;
|
import com.volvo.ai.analytic.center.dto.req.DiFyReq;
|
||||||
import com.volvo.ai.analytic.center.feign.DiFyFeign;
|
import com.volvo.ai.analytic.center.feign.DiFyFeign;
|
||||||
@@ -24,7 +25,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入参:{}",JSON.toJSONString(map));
|
log.info("请求DiFy入参:{}", JSON.toJSONString(map));
|
||||||
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");
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ public class MqMessageRecordServiceImpl extends ServiceImpl<MqMessageRecordMappe
|
|||||||
diFyImageReq.setFlowId(imageFlowId);
|
diFyImageReq.setFlowId(imageFlowId);
|
||||||
JSONObject imageInputs = new JSONObject();
|
JSONObject imageInputs = new JSONObject();
|
||||||
imageInputs.put("image", JSON.toJSONString(diFyImageWorkFlow));
|
imageInputs.put("image", JSON.toJSONString(diFyImageWorkFlow));
|
||||||
diFyImageReq.setInputs(imageInputs.toJSONString());
|
diFyImageReq.setInputs(imageInputs);
|
||||||
|
|
||||||
//调用dify图片分析workflow
|
//调用dify图片分析workflow
|
||||||
JSONObject difImageResult = (JSONObject) diFyService.getDiFyObject(diFyImageReq);
|
JSONObject difImageResult = (JSONObject) diFyService.getDiFyObject(diFyImageReq);
|
||||||
|
|||||||
Reference in New Issue
Block a user