diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/midjourney/MidjourneyProperties.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/midjourney/MidjourneyConfig.java similarity index 65% rename from yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/midjourney/MidjourneyProperties.java rename to yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/midjourney/MidjourneyConfig.java index fc381a1c4..7a4dd9e1d 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/midjourney/MidjourneyProperties.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/midjourney/MidjourneyConfig.java @@ -10,9 +10,18 @@ import lombok.Data; * @since 1.0 */ @Data -public class MidjourneyProperties { +public class MidjourneyConfig { + /** + * keys + */ private String key; + /** + * 请求地址 + */ private String url; + /** + * 通知回调地址 + */ private String notifyUrl; } diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/midjourney/api/MidjourneyApi.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/midjourney/api/MidjourneyApi.java index ee5d40691..aa0fbda00 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/midjourney/api/MidjourneyApi.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/core/model/midjourney/api/MidjourneyApi.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.framework.ai.core.model.midjourney.api; -import cn.iocoder.yudao.framework.ai.core.model.midjourney.MidjourneyProperties; +import cn.iocoder.yudao.framework.ai.core.model.midjourney.MidjourneyConfig; import cn.iocoder.yudao.framework.common.util.json.JsonUtils; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; @@ -29,13 +29,13 @@ public class MidjourneyApi { private static final String URI_ACTON = "/submit/action"; private static final String URI_LIST_BY_CONDITION = "/task/list-by-condition"; private final WebClient webClient; - private final MidjourneyProperties midjourneyProperties; + private final MidjourneyConfig midjourneyConfig; - public MidjourneyApi(MidjourneyProperties midjourneyProperties) { - this.midjourneyProperties = midjourneyProperties; + public MidjourneyApi(MidjourneyConfig midjourneyConfig) { + this.midjourneyConfig = midjourneyConfig; this.webClient = WebClient.builder() - .baseUrl(midjourneyProperties.getUrl()) - .defaultHeaders(ApiUtils.getJsonContentHeaders(midjourneyProperties.getKey())) + .baseUrl(midjourneyConfig.getUrl()) + .defaultHeaders(ApiUtils.getJsonContentHeaders(midjourneyConfig.getKey())) .build(); }