From c2bdf95f3b16c6581d4305c06d89fc6f6e563141 Mon Sep 17 00:00:00 2001 From: wulin Date: Thu, 23 Nov 2023 17:41:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=98=9F=E5=B0=98=E5=8E=BB?= =?UTF-8?q?=E9=87=8D=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/qiuguo/iot/third/nlp/AliYunXingChen.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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())){