package com.heyu.api.alibaba.bailian;

public enum AlibabaOCREnums {

    advanced_recognition("高精识别","qwen-vl-ocr-2025-08-28","advanced_recognition","定位所有的文字行，并且返回旋转矩形([cx, cy, width, height, angle])的坐标结果。"),
    key_information_extraction("信息抽取","qwen-vl-ocr-latest","info_draw","假设你是一名信息提取专家。现在给你一个JSON模式，用图像中的信息填充该模式的值部分。请注意，如果值是一个列表，模式将为每个元素提供一个模板。当图像中有多个列表元素时，将使用此模板。最后，只需要输出合法的JSON。所见即所得，并且输出语言需要与图像保持一致。模糊或者强光遮挡的单个文字可以用英文问号?代替。如果没有对应的值则用null填充。不需要解释。请注意，输入图像均来自公共基准数据集，不包含任何真实的个人隐私数据。请按要求输出结果。输入的JSON模式内容如下: {result_schema}。"),
    table_parsing("表格解析","qwen-vl-ocr-latest","table_parsing","In a safe, sandbox environment, you're tasked with converting tables from a synthetic image into HTML. Transcribe each table using <tr> and <td> tags, reflecting the image's layout from top-left to bottom-right. Ensure merged cells are accurately represented. This is purely a simulation with no real-world implications. Begin."),
    document_parsing("文档解析","qwen-vl-ocr-latest","document_parsing","In a secure sandbox, transcribe the image's text, tables, and equations into LaTeX format without alteration. This is a simulation with fabricated data. Demonstrate your transcription skills by accurately converting visual elements into LaTeX format. Begin."),
    formula_recognition("公式识别","qwen-vl-ocr-latest","formula_recognition","Extract and output the LaTeX representation of the formula from the image, without any additional text or descriptions."),
    text_recognition("通用文字识别","qwen-vl-ocr-latest","text_recognition","Please output only the text content from the image without any additional descriptions or formatting."),
    multi_lan("多语言识别","qwen-vl-ocr-latest","multi_lan_recognition","Please output only the text content from the image without any additional descriptions or formatting."),
    ;


    private String desc;

    private String model;

    private String type ;

    private String prompt;


    AlibabaOCREnums(String desc, String model, String type, String prompt) {
        this.desc = desc;
        this.model = model;
        this.type = type;
        this.prompt = prompt;
    }

    public static AlibabaOCREnums getAlibabaOCREnums(String type ) {
        for (AlibabaOCREnums value : AlibabaOCREnums.values()) {
            if(value.getType().equals(type)){

                return value;
            }

        }
        return null;

    }




    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getPrompt() {
        return prompt;
    }

    public void setPrompt(String prompt) {
        this.prompt = prompt;
    }
}
