增加日志

This commit is contained in:
zren25
2025-06-13 11:16:50 +08:00
parent ec5c9eaddf
commit 3d0a9bc989

View File

@@ -129,12 +129,17 @@ public class DiFyServiceImpl implements DiFyService{
@Override
public JSONObject executeDifyFlow(DiFyReq diFyReq) {
Map<String, Object> map = new HashMap<>();
map.put("inputs",diFyReq.getInputs());
map.put("response_mode","blocking");
map.put("user",diFyReq.getUser());
JSONObject difyResult = diFyFeign.runWorkflows("Bearer "+diFyReq.getFlowId(),map);
JSONObject data = difyResult.getJSONObject("data");
JSONObject data = null;
try {
Map<String, Object> map = new HashMap<>();
map.put("inputs",diFyReq.getInputs());
map.put("response_mode","blocking");
map.put("user",diFyReq.getUser());
JSONObject difyResult = diFyFeign.runWorkflows("Bearer "+diFyReq.getFlowId(),map);
data = difyResult.getJSONObject("data");
} catch (Exception e) {
log.info("dify请求失败executeDifyFlow{}",e);
}
return data;
}