BUGFIX:aida;
This commit is contained in:
@@ -3311,7 +3311,7 @@ public class PythonService {
|
||||
return text;
|
||||
}
|
||||
|
||||
public Boolean toProductImage(String url, String taskId, String prompt, BigDecimal imageStrength) {
|
||||
public Boolean toProductImage(String url, String taskId, String prompt, BigDecimal imageStrength, String productType) {
|
||||
// todo 限流校验
|
||||
// AccessLimitUtils.validate("design",5);
|
||||
OkHttpClient client = new OkHttpClient().newBuilder()
|
||||
@@ -3327,6 +3327,7 @@ public class PythonService {
|
||||
map.put("image_url", url);
|
||||
map.put("prompt", prompt);
|
||||
map.put("image_strength", imageStrength);
|
||||
map.put("product_type", productType);
|
||||
log.info("toProductImage请求python 参数:####{}", map);
|
||||
String param = JSON.toJSONString(map, SerializerFeature.WriteNullStringAsEmpty);
|
||||
System.out.println(param);
|
||||
@@ -3334,7 +3335,7 @@ public class PythonService {
|
||||
Request request = new Request.Builder()
|
||||
// .url(accessPythonIp + ":" + accessPythonPort + "/api/generate_product_image")
|
||||
// .url(accessPythonIp + ":9996/api/generate_product_image")
|
||||
.url(accessPythonIp + ":9994/api/generate_product_image")
|
||||
.url(accessPythonIp + ":9996/api/generate_product_image")
|
||||
.method("POST", body)
|
||||
.addHeader("Authorization", "Basic YWlkbGFiOjEyMw==")
|
||||
.addHeader("Content-Type", "application/json")
|
||||
@@ -3355,7 +3356,7 @@ public class PythonService {
|
||||
throw new BusinessException("toProductImage.interface.exception");
|
||||
}
|
||||
|
||||
public Boolean relight(String url, String taskId, String prompt, String direction) {
|
||||
public Boolean relight(String url, String taskId, String prompt, String direction, String relightType) {
|
||||
// todo 限流校验
|
||||
// AccessLimitUtils.validate("design",5);
|
||||
OkHttpClient client = new OkHttpClient().newBuilder()
|
||||
@@ -3371,6 +3372,7 @@ public class PythonService {
|
||||
map.put("image_url", url);
|
||||
map.put("prompt", prompt);
|
||||
map.put("direction", direction);
|
||||
map.put("product_type", relightType);
|
||||
log.info("relightImage请求python 参数:####{}", map);
|
||||
String param = JSON.toJSONString(map, SerializerFeature.WriteNullStringAsEmpty);
|
||||
log.info(param);
|
||||
|
||||
Reference in New Issue
Block a user