优化星尘去重规则

This commit is contained in:
wulin 2023-11-23 17:41:07 +08:00
parent 9cd117a8a0
commit c2bdf95f3b

View File

@ -100,7 +100,7 @@ public class AliYunXingChen {
Flowable<ChatResult> 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())){