diff --git a/src/main/java/com/ai/da/python/PythonService.java b/src/main/java/com/ai/da/python/PythonService.java index 7eb77e1a..9f681376 100644 --- a/src/main/java/com/ai/da/python/PythonService.java +++ b/src/main/java/com/ai/da/python/PythonService.java @@ -2359,8 +2359,8 @@ public class PythonService { log.info("design请求python 参数:####{}", param); RequestBody body = RequestBody.create(mediaType, param); Request request = new Request.Builder() -// .url(accessPythonIp + ":" + accessPythonPort + "/api/design") - .url(fastApiPythonAddress + "/api/design") + .url(accessPythonIp + ":" + accessPythonPort + "/api/design") +// .url(fastApiPythonAddress + "/api/design") // .url(accessPythonIp + ":10200/aifda/api/v1.0/generate") .method("POST", body) .addHeader("Authorization", "Basic YWlkbGFiOjEyMw==") @@ -2466,8 +2466,8 @@ public class PythonService { System.out.println(JSON.toJSONString(content)); RequestBody body = RequestBody.create(mediaType, JSON.toJSONString(content)); Request request = new Request.Builder() -// .url(accessPythonIp + ":" + accessPythonPort + "/api/attribute_retrieve") - .url(fastApiPythonAddress + "/api/attribute_retrieve") + .url(accessPythonIp + ":" + accessPythonPort + "/api/attribute_retrieve") +// .url(fastApiPythonAddress + "/api/attribute_retrieve") // .url(accessPythonIp+":9991/aifda/api/v1.0/attribute_retrieval") .method("POST", body) .addHeader("Authorization", "Basic YWlkbGFiOjEyMw==") @@ -3262,9 +3262,11 @@ public class PythonService { String jsonString = JSON.toJSONString(content, SerializerFeature.WriteNullStringAsEmpty); RequestBody body = RequestBody.create(mediaType, jsonString); + String path = accessPythonIp + ":" + accessPythonPort + "/api/translateToEN"; + log.info("translateToEN 请求地址: {}", path); Request request = new Request.Builder() -// .url(accessPythonIp + ":" + accessPythonPort + "/api/translateToEN") - .url(fastApiPythonAddress + "/api/translateToEN") + .url(path) +// .url(fastApiPythonAddress + "/api/translateToEN") .method("POST", body) .addHeader("Content-Type", "application/json") .build(); 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 e6ea08c8..fdaecc96 100644 --- a/src/main/java/com/ai/da/service/impl/ChatRobotServiceImpl.java +++ b/src/main/java/com/ai/da/service/impl/ChatRobotServiceImpl.java @@ -152,8 +152,8 @@ 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(accessPythonIp + ":" + accessPythonPort + "/api/chat_stream_test") - .url(fastApiPythonAddress + "/api/chat_robot") + .url(accessPythonIp + ":" + accessPythonPort + "/api/chat_stream_test") +// .url(fastApiPythonAddress + "/api/chat_robot") // .url(accessPythonIp + ":10200/aifda/api/v1.0/generate") .method("POST", body) .addHeader("Content-Type", "application/json") diff --git a/src/main/resources/application-dev.properties b/src/main/resources/application-dev.properties index f6224ea9..e54dd61e 100644 --- a/src/main/resources/application-dev.properties +++ b/src/main/resources/application-dev.properties @@ -45,7 +45,7 @@ spring.servlet.multipart.max-request-size= 10MB access.python.ip=http://18.167.251.121 access.python.port=9992 access.python.generate_sr_port=9994 -access.python.address=http://18.167.251.121:9996 +access.python.address=http://18.167.251.121:9994 minio.endpoint=https://www.minio.aida.com.hk:9000 minio.accessKey=admin