File size: 3,381 Bytes
c9d0005
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
const settings = [
  {
    type: 'Start',
    title: '开始节点',
    hidden: true,
    targetHandleHidden: true,
    icon: {
      type: 'icon-start',
      bgColor: '#17B26A',
    },
    settingSchema: {
      type: 'object',
      properties: {
        input: {
          type: 'string',
          title: '输入',
        },
      },
    },
  },
  {
    type: 'LLM',
    title: 'LLM 处理',
    icon: {
      type: 'icon-model',
      bgColor: '#6172F3',
    },
    nodeWidget: 'LLMNodeWidget',
    className: 'node-llm-style',
    settingSchema: {
      type: 'object',
      properties: {
        model: {
          type: 'string',
          title: '模型',
          widget: 'select',
          enum: ['GPT-4', 'GPT-3.5', 'Claude'],
          default: 'GPT-4',
        },
        temperature: {
          type: 'number',
          title: '温度',
          widget: 'slider',
          minimum: 0,
          maximum: 1,
          default: 0.7,
        },
        maxTokens: {
          type: 'number',
          title: '最大Token',
          default: 200,
        },
        systemPrompt: {
          type: 'string',
          title: '系统提示词',
          default: '你是一个专业的AI助手,请帮助用户解决问题。',
        },
      },
    },
  },
  {
    type: 'HTTP',
    title: 'HTTP请求',
    icon: {
      type: 'icon-http',
      bgColor: '#875BF7',
    },
    nodeWidget: 'HTTPNodeWidget',
    settingSchema: {
      type: 'object',
      properties: {
        method: {
          type: 'string',
          title: '请求方法',
          widget: 'select',
          enum: ['GET', 'POST', 'PUT', 'DELETE'],
          default: 'POST',
        },
        url: {
          type: 'string',
          title: '请求地址',
          default: 'https://api.example.com/process',
        },
        headers: {
          type: 'string',
          title: '请求头',
          default: JSON.stringify({ 'Content-Type': 'application/json' }),
        },
        body: {
          type: 'string',
          title: '请求体',
          default: JSON.stringify({ key: 'value' }),
        },
      },
    },
  },
  {
    type: 'Classifier',
    title: '问题分类',
    icon: {
      type: 'icon-gongju',
      bgColor: '#2E90FA',
    },
    nodeWidget: 'ClassifierNodeWidget',
    settingSchema: {
      type: 'object',
      properties: {
        categories: {
          type: 'array',
          title: '分类',
          widget: 'select',
          enum: ['技术问题', '业务问题', '其他'],
          default: ['技术问题', '业务问题', '其他'],
        },
        rules: {
          type: 'string',
          title: '规则',
          default: '根据问题描述的关键词进行分类',
        },
        defaultCategory: {
          type: 'string',
          title: '默认分类',
          widget: 'select',
          enum: ['技术问题', '业务问题', '其他'],
          default: '其他',
        },
      },
    },
  },
  {
    type: 'End',
    title: '结束节点',
    hidden: true,
    sourceHandleHidden: true,
    icon: {
      type: 'icon-end',
      bgColor: '#F79009',
    },
    settingSchema: {
      type: 'object',
      properties: {
        input: {
          type: 'string',
          title: '输入',
          widget: 'input',
        },
      },
    },
  },
];

export default settings;