package com.webchat.common.enums;


import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.StringUtils;

@Getter
@AllArgsConstructor
@NoArgsConstructor
public enum AiFunctionEnum {

    CHAT("对话"),

    IMAGE("文生图");

    private String functionName;


    public static String getFunctionName(String function) {
        if (StringUtils.isBlank(function)) {
            return "未识别到意图";
        }
        for (AiFunctionEnum aiFunctionEnum : AiFunctionEnum.values()) {
            if (aiFunctionEnum.name().equals(function)) {
                return aiFunctionEnum.getFunctionName();
            }
        }
        return "未识别到意图";
    }
}
