增加日志

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 @Override
public JSONObject executeDifyFlow(DiFyReq diFyReq) { public JSONObject executeDifyFlow(DiFyReq diFyReq) {
Map<String, Object> map = new HashMap<>(); JSONObject data = null;
map.put("inputs",diFyReq.getInputs()); try {
map.put("response_mode","blocking"); Map<String, Object> map = new HashMap<>();
map.put("user",diFyReq.getUser()); map.put("inputs",diFyReq.getInputs());
JSONObject difyResult = diFyFeign.runWorkflows("Bearer "+diFyReq.getFlowId(),map); map.put("response_mode","blocking");
JSONObject data = difyResult.getJSONObject("data"); 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; return data;
} }