#
Junjie
3 天以前 0c1110daa59bf77ddcff2704641280f417158c10
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package com.zy.ai.enums;
 
public enum AiPromptBlockType {
 
    BASE_POLICY("base_policy", "Base Policy", "基础策略", 10),
    TOOL_POLICY("tool_policy", "Tool Policy", "工具策略", 20),
    OUTPUT_CONTRACT("output_contract", "Output Contract", "输出约定", 30),
    SCENE_PLAYBOOK("scene_playbook", "Scene Playbook", "场景策略", 40);
 
    private final String code;
    private final String title;
    private final String label;
    private final int sort;
 
    AiPromptBlockType(String code, String title, String label, int sort) {
        this.code = code;
        this.title = title;
        this.label = label;
        this.sort = sort;
    }
 
    public String getCode() {
        return code;
    }
 
    public String getTitle() {
        return title;
    }
 
    public String getLabel() {
        return label;
    }
 
    public int getSort() {
        return sort;
    }
 
    public static AiPromptBlockType ofCode(String code) {
        if (code == null) {
            return null;
        }
        for (AiPromptBlockType item : values()) {
            if (item.code.equals(code)) {
                return item;
            }
        }
        return null;
    }
}