From 39367f5fb703747c12b68ec1b8cb120b35945811 Mon Sep 17 00:00:00 2001 From: shahaibo <1023316923@qq.com> Date: Wed, 10 Jan 2024 10:48:48 +0800 Subject: [PATCH] =?UTF-8?q?TASK:=E6=9C=BA=E5=99=A8=E4=BA=BA=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ai/da/service/impl/ChatRobotServiceImpl.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 e94c5a3c..5f06a194 100644 --- a/src/main/java/com/ai/da/service/impl/ChatRobotServiceImpl.java +++ b/src/main/java/com/ai/da/service/impl/ChatRobotServiceImpl.java @@ -79,6 +79,10 @@ public class ChatRobotServiceImpl implements ChatRobotService { private final ExecutorService executorService = Executors.newSingleThreadExecutor(); Integer timeout = 99999999; + @Value("${access.python.ip:''}") + private String accessPythonIp; + @Value("${access.python.port:''}") + private String accessPythonPort; @Override @Transactional(rollbackFor = Exception.class) public ChatRobotVO sendMessageToChatRobot(ChatSendDTO chatSendDTO) { @@ -142,7 +146,7 @@ public class ChatRobotServiceImpl implements ChatRobotService { RequestBody body = RequestBody.create(mediaType, param); Request request = new Request.Builder() // .url("http://127.0.0.1:5000/api/chat_stream_test") - .url("http://18.167.251.121:9991/api/chat_stream_test") + .url(accessPythonIp + ":" + accessPythonPort + "/api/chat_stream_test") // .url(accessPythonIp + ":10200/aifda/api/v1.0/generate") .method("POST", body) .addHeader("Content-Type", "application/json")