【代码重构】AI:spring ai 依赖,升级到 1.0.0-M6

This commit is contained in:
YunaiV
2025-02-22 10:47:18 +08:00
parent 3b7b81829d
commit 7ef73b7d09
18 changed files with 199 additions and 714 deletions

View File

@@ -1,4 +1,4 @@
/**
* crm 模块的 web 拓展封装
* ai 模块的 web 拓展封装
*/
package cn.iocoder.yudao.module.crm.framework.web;
package cn.iocoder.yudao.module.ai.framework.web;

View File

@@ -20,7 +20,6 @@ import cn.iocoder.yudao.module.ai.dal.mysql.image.AiImageMapper;
import cn.iocoder.yudao.module.ai.enums.image.AiImageStatusEnum;
import cn.iocoder.yudao.module.ai.service.model.AiApiKeyService;
import cn.iocoder.yudao.module.infra.api.file.FileApi;
import com.alibaba.cloud.ai.tongyi.image.TongYiImagesOptions;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.ai.image.ImageModel;
@@ -144,7 +143,7 @@ public class AiImageServiceImpl implements AiImageService {
.withClipGuidancePreset(String.valueOf(draw.getOptions().get("clipGuidancePreset")))
.build();
} else if (ObjUtil.equal(draw.getPlatform(), AiPlatformEnum.TONG_YI.getPlatform())) {
return TongYiImagesOptions.builder()
return DashScopeImageOptions.builder()
.withModel(draw.getModel()).withN(1)
.withHeight(draw.getHeight()).withWidth(draw.getWidth())
.build();