diff --git a/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/ChatRoleClassifyEnum.java b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/ChatRoleClassifyEnum.java new file mode 100644 index 000000000..583bf7483 --- /dev/null +++ b/yudao-module-ai/yudao-module-ai-api/src/main/java/cn/iocoder/yudao/module/ai/enums/ChatRoleClassifyEnum.java @@ -0,0 +1,37 @@ +package cn.iocoder.yudao.module.ai.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * 聊天role 分类 + * + * @author fansili + * @time 2024/4/24 16:41 + * @since 1.0 + */ +@AllArgsConstructor +@Getter +public enum ChatRoleClassifyEnum { + + WRITING("writing", "写作"), + + ENTERTAINMENT("entertainment", "娱乐"), + + ; + + + private String classify; + + private String name; + + + public static ChatRoleClassifyEnum valueOfClassify(String classify) { + for (ChatRoleClassifyEnum itemEnum : ChatRoleClassifyEnum.values()) { + if (itemEnum.getClassify().equals(classify)) { + return itemEnum; + } + } + throw new IllegalArgumentException("Invalid MessageType value: " + classify); + } +}