From efdaa75be0ca5a8a93728d3439605cb7005b3e0b Mon Sep 17 00:00:00 2001 From: zhouchengrong Date: Wed, 26 Jul 2023 10:44:20 +0800 Subject: [PATCH] =?UTF-8?q?chat=20robot=20=E8=B0=83=E8=AF=95=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=20=E6=B6=88=E6=81=AF=E5=93=8D=E5=BA=94=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E4=B8=80=E7=A7=92=E4=B8=80=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../da/service/impl/ChatRobotServiceImpl.java | 4 +++- .../spring-configuration-metadata.json | 20 ------------------- 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/src/main/java/com/ai/da/service/impl/ChatRobotServiceImpl.java b/src/main/java/com/ai/da/service/impl/ChatRobotServiceImpl.java index 40cbe97c..ec329e05 100644 --- a/src/main/java/com/ai/da/service/impl/ChatRobotServiceImpl.java +++ b/src/main/java/com/ai/da/service/impl/ChatRobotServiceImpl.java @@ -9,7 +9,6 @@ import com.ai.da.service.ChatRobotService; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import lombok.extern.slf4j.Slf4j; -import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Service; import org.springframework.web.client.RestTemplate; import org.springframework.web.servlet.mvc.method.annotation.SseEmitter; @@ -72,7 +71,10 @@ public class ChatRobotServiceImpl implements ChatRobotService { String line; while ((line = reader.readLine()) != null) { log.info(line); + emitter.send(line); + Thread.sleep(1000); + } reader.close(); } else { diff --git a/target/classes/META-INF/spring-configuration-metadata.json b/target/classes/META-INF/spring-configuration-metadata.json index c9c480bc..42f855e7 100644 --- a/target/classes/META-INF/spring-configuration-metadata.json +++ b/target/classes/META-INF/spring-configuration-metadata.json @@ -41,26 +41,6 @@ "type": "java.lang.String", "sourceType": "com.ai.da.common.config.FileProperties" }, - { - "name": "file.linux.path", - "type": "java.lang.String", - "sourceType": "com.ai.da.common.config.FileProperties$ElPath" - }, - { - "name": "file.mac.path", - "type": "java.lang.String", - "sourceType": "com.ai.da.common.config.FileProperties$ElPath" - }, - { - "name": "file.sys.path", - "type": "java.lang.String", - "sourceType": "com.ai.da.common.config.FileProperties$ElPath" - }, - { - "name": "file.windows.path", - "type": "java.lang.String", - "sourceType": "com.ai.da.common.config.FileProperties$ElPath" - }, { "name": "spring.security.auth-api", "type": "java.lang.String",