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")