mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2025-01-19 03:30:06 +08:00
【优化】buildImageOptions 支持千帆
This commit is contained in:
parent
db7315b8cd
commit
18aeb072a6
@ -31,6 +31,7 @@ import org.springframework.ai.image.ImageOptions;
|
|||||||
import org.springframework.ai.image.ImagePrompt;
|
import org.springframework.ai.image.ImagePrompt;
|
||||||
import org.springframework.ai.image.ImageResponse;
|
import org.springframework.ai.image.ImageResponse;
|
||||||
import org.springframework.ai.openai.OpenAiImageOptions;
|
import org.springframework.ai.openai.OpenAiImageOptions;
|
||||||
|
import org.springframework.ai.qianfan.QianFanImageOptions;
|
||||||
import org.springframework.ai.stabilityai.api.StabilityAiImageOptions;
|
import org.springframework.ai.stabilityai.api.StabilityAiImageOptions;
|
||||||
import org.springframework.scheduling.annotation.Async;
|
import org.springframework.scheduling.annotation.Async;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -142,6 +143,11 @@ public class AiImageServiceImpl implements AiImageService {
|
|||||||
.withModel(draw.getModel()).withN(1)
|
.withModel(draw.getModel()).withN(1)
|
||||||
.withHeight(draw.getHeight()).withWidth(draw.getWidth())
|
.withHeight(draw.getHeight()).withWidth(draw.getWidth())
|
||||||
.build();
|
.build();
|
||||||
|
} else if (ObjUtil.equal(draw.getPlatform(), AiPlatformEnum.YI_YAN.getPlatform())) {
|
||||||
|
return QianFanImageOptions.builder()
|
||||||
|
.withModel(draw.getModel()).withN(1)
|
||||||
|
.withHeight(draw.getHeight()).withWidth(draw.getWidth())
|
||||||
|
.build();
|
||||||
}
|
}
|
||||||
throw new IllegalArgumentException("不支持的 AI 平台:" + draw.getPlatform());
|
throw new IllegalArgumentException("不支持的 AI 平台:" + draw.getPlatform());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user