mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-23 07:41:53 +08:00
【新增】增加open ai image 模型类型
This commit is contained in:
parent
ca0024988c
commit
7d3ed1fef3
@ -0,0 +1,35 @@
|
||||
package cn.iocoder.yudao.framework.ai.imageopenai;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* open ai
|
||||
*
|
||||
* @author fansili
|
||||
* @time 2024/4/28 14:21
|
||||
* @since 1.0
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum OpenAiImageModelEnum {
|
||||
|
||||
DALL_E_2("dall-e-2", "dall-e-2"),
|
||||
|
||||
DALL_E_3("dall-e-3", "dall-e-3")
|
||||
|
||||
;
|
||||
|
||||
private String model;
|
||||
|
||||
private String name;
|
||||
|
||||
public static OpenAiImageModelEnum valueOfModel(String model) {
|
||||
for (OpenAiImageModelEnum itemEnum : OpenAiImageModelEnum.values()) {
|
||||
if (itemEnum.getModel().equals(model)) {
|
||||
return itemEnum;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("Invalid MessageType value: " + model);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user