diff --git a/iot-common/iot-third/src/main/java/com/qiuguo/iot/third/nlp/AliYunXingChen.java b/iot-common/iot-third/src/main/java/com/qiuguo/iot/third/nlp/AliYunXingChen.java index ab8f217..0e8232d 100644 --- a/iot-common/iot-third/src/main/java/com/qiuguo/iot/third/nlp/AliYunXingChen.java +++ b/iot-common/iot-third/src/main/java/com/qiuguo/iot/third/nlp/AliYunXingChen.java @@ -100,7 +100,7 @@ public class AliYunXingChen { Flowable response = api.streamOut(chatReqParams); RecordMessage recordMessage = new RecordMessage(); response.blockingForEach(m -> { - String v = m.getChoices().get(0).getMessages().get(0).getContent().replaceAll(recordMessage.getMsg(), ""); + String v = m.getChoices().get(0).getMessages().get(0).getContent().substring(recordMessage.getMsg().length()); onNext.sendMessage(v); recordMessage.setMsg(m.getChoices().get(0).getMessages().get(0).getContent()); if("stop".equals(m.getChoices().get(0).getStopReason())){