Commit ca5e19d3 authored by 赵灿灿's avatar 赵灿灿

无需去除空格

parent cb34216f
Pipeline #23066 passed with stages
in 7 minutes and 59 seconds
......@@ -1050,14 +1050,14 @@ public class LangChainController {
logger.info("Response body:" + line);
if (!line.startsWith("data:CALLBACK#")) {
if (line.startsWith("data:")) {
String data = line.substring(5).trim();
String data = line.substring(5);
if ("stop".equals(data)) {
emitter.send(SseEmitter.event().data("stop"), MediaType.parseMediaType("application/json; charset=UTF-8"));
isSendStop = true;
} else {
lineCotent.append(data);
String sendData = data.replace("attachment#[]#attachment", "").replace("source#[]#source", "")
.replace("#", "").replace("*", "");
.replace("#", "").replace("*", "").replace("^", " ");
emitter.send(SseEmitter.event().data(sendData), MediaType.parseMediaType("application/json; charset=UTF-8"));
if (!sendData.startsWith("SUGGEST["))
content.append(sendData);
......
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