Commit 307e08435dc7d0a5d6a8ebd821a9488aa32069ec
1 parent
7d3ed1fe
【优化】调整imageSize
Showing
1 changed file
with
3 additions
and
3 deletions
yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/imageopenai/OpenAiImageOptions.java
| ... | ... | @@ -22,7 +22,7 @@ public class OpenAiImageOptions implements ImageOptions { |
| 22 | 22 | |
| 23 | 23 | // 可选字段,默认为dall-e-2 |
| 24 | 24 | // 指定用于生成图像的模型名称。 |
| 25 | - private String model = "dall-e-2"; | |
| 25 | + private OpenAiImageModelEnum model = OpenAiImageModelEnum.DALL_E_2; | |
| 26 | 26 | |
| 27 | 27 | // 可选字段,默认为1 |
| 28 | 28 | // 生成图像的数量,必须在1到10之间。对于dall-e-3模型,目前仅支持n=1。 |
| ... | ... | @@ -38,7 +38,7 @@ public class OpenAiImageOptions implements ImageOptions { |
| 38 | 38 | |
| 39 | 39 | // 可选字段,默认为1024x1024 |
| 40 | 40 | // 生成图像的尺寸大小。对于dall-e-2模型,尺寸可为256x256, 512x512, 或 1024x1024。对于dall-e-3模型,尺寸可为1024x1024, 1792x1024, 或 1024x1792。 |
| 41 | - private String imageSize = "1024x1024"; | |
| 41 | + private String size = "1024x1024"; | |
| 42 | 42 | |
| 43 | 43 | // 可选字段,默认为vivid |
| 44 | 44 | // 图像生成的风格。可为vivid(生动)或natural(自然)。vivid会使模型偏向生成超现实和戏剧性的图像,而natural则会让模型产出更自然、不那么超现实的图像。该参数仅对dall-e-3模型有效。 |
| ... | ... | @@ -73,7 +73,7 @@ public class OpenAiImageOptions implements ImageOptions { |
| 73 | 73 | |
| 74 | 74 | @Override |
| 75 | 75 | public String getModel() { |
| 76 | - return this.model; | |
| 76 | + return this.model.getModel(); | |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | @Override | ... | ... |