chat-robot返回sketch图片地址变更

This commit is contained in:
2024-10-29 16:53:17 +08:00
parent 7c56d2bf4e
commit 1e1b06fc48

View File

@@ -154,7 +154,6 @@ public class ChatRobotServiceImpl extends ServiceImpl<ChatRobotMapper, ChatRobot
RequestBody body = RequestBody.create(mediaType, param);
Request request = new Request.Builder()
// .url("http://127.0.0.1:8000/api/chat_robot")
// .url(accessPythonIp + ":" + accessPythonPort + "/api/chat_stream_test")
.url(accessPythonIp + ":" + accessPythonPort + "/api/chat_robot")
.method("POST", body)
.addHeader("Content-Type", "application/json")
@@ -363,6 +362,11 @@ public class ChatRobotServiceImpl extends ServiceImpl<ChatRobotMapper, ChatRobot
}
private String getPrefix(String minioPath,String gender){
if (minioPath.startsWith("\\male") || minioPath.startsWith("\\female")){
minioPath = minioPath.replace("\\male\\", "");
minioPath = minioPath.replace("\\female\\", "").replace("\\", "/");
}
if (gender.equals("Male")){
String substring = minioPath.substring(minioPath.lastIndexOf("/") + 1, minioPath.lastIndexOf("_"));
String folder = minioPath.substring(0,minioPath.lastIndexOf("/"));