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) {
|
||||
public Boolean toProductImage(String url, String taskId, String prompt, BigDecimal imageStrength) {
|
||||
// todo 限流校验
|
||||
// AccessLimitUtils.validate("design",5);
|
||||
OkHttpClient client = new OkHttpClient().newBuilder()
|
||||
@@ -3322,12 +3322,14 @@ public class PythonService {
|
||||
.build();
|
||||
MediaType mediaType = MediaType.parse("application/json");
|
||||
//关闭FastJson的引用检测 防止出现$ref 现象
|
||||
Map<String, String> map = new HashMap<>();
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("tasks_id", taskId);
|
||||
map.put("image_url", url);
|
||||
map.put("prompt", prompt);
|
||||
map.put("image_strength", imageStrength);
|
||||
log.info("toProductImage请求python 参数:####{}", map);
|
||||
String param = JSON.toJSONString(map, SerializerFeature.WriteNullStringAsEmpty);
|
||||
System.out.println(param);
|
||||
RequestBody body = RequestBody.create(mediaType, param);
|
||||
Request request = new Request.Builder()
|
||||
// .url(accessPythonIp + ":" + accessPythonPort + "/api/generate_product_image")
|
||||
@@ -3370,6 +3372,7 @@ public class PythonService {
|
||||
map.put("prompt", prompt);
|
||||
log.info("relightImage请求python 参数:####{}", map);
|
||||
String param = JSON.toJSONString(map, SerializerFeature.WriteNullStringAsEmpty);
|
||||
log.info(param);
|
||||
RequestBody body = RequestBody.create(mediaType, param);
|
||||
Request request = new Request.Builder()
|
||||
// .url(accessPythonIp + ":" + accessPythonPort + "/api/generate_product_image")
|
||||
|
||||
Reference in New Issue
Block a user