Commit 0894277f authored by 何金镒's avatar 何金镒

异常处理

parent 3c009632
...@@ -57,6 +57,14 @@ public class DifyChatSteamEventListener { ...@@ -57,6 +57,14 @@ public class DifyChatSteamEventListener {
.execute().body(); .execute().body();
log.info("dify请求返回11--->:{}",ai_result); log.info("dify请求返回11--->:{}",ai_result);
if(ai_result.contains("服务器异常")){
JSONObject json = new JSONObject();
json.set("msg", ai_result);
json.set("type", "other");
webSocketUtil.sendToSingle(event.getSn(), json.toString());
}
// ai_result = ai_result.replaceAll("\n", "##").trim(); // ai_result = ai_result.replaceAll("\n", "##").trim();
// log.info("dify请求返回22--->:{}",ai_result); // log.info("dify请求返回22--->:{}",ai_result);
// //
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment