mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-16 03:55:06 +08:00
【增加】图片绘画增加 绘画失败状态,并保存绘画错误信息,同时可以将错误信息返回给前端
This commit is contained in:
@ -0,0 +1,35 @@
|
||||
package cn.iocoder.yudao.module.ai.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* ai绘画状态
|
||||
*
|
||||
* @author fansili
|
||||
* @time 2024/4/28 17:05
|
||||
* @since 1.0
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum AiChatDrawingStatusEnum {
|
||||
|
||||
COMPLETE("complete", "完成"),
|
||||
FAIL("fail", "失败"),
|
||||
|
||||
;
|
||||
|
||||
private String status;
|
||||
|
||||
private String name;
|
||||
|
||||
|
||||
public static AiChatDrawingStatusEnum valueOfStatus(String status) {
|
||||
for (AiChatDrawingStatusEnum itemEnum : AiChatDrawingStatusEnum.values()) {
|
||||
if (itemEnum.getStatus().equals(status)) {
|
||||
return itemEnum;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("Invalid MessageType value: " + status);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user