import type { WorkflowNode } from '../../types/nodeConfig';
import { GroupEnum, NodeTypeEnum } from '../../types/nodeConfig';
const config: WorkflowNode = {
type: 'BaiduSearchNode',
nodeType: NodeTypeEnum.Common,
label: '百度搜索',
group: GroupEnum.Tool,
description: '调用百度搜索引擎',
icon: 'svg:baidu',
data: {
paramSchemas: [
{
fieldName: 'input',
label: '搜索关键词',
help: '要调用搜索引擎的关键词',
componentProps: {
placeholder: '请输入关键词',
},
rules: 'required',
component: 'Input',
defaultValue: '',
},
{
fieldName: 'num',
label: '搜索条数',
help: '搜索条数,默认为5',
componentProps: {
placeholder: '请输入搜索条数',
},
rules: 'required',
component: 'InputNumber',
},
],
params: {
input: '',
num: 5,
},
outputs: [{ field: 'text', type: 'string', description: '百度搜索结果' }],
},
};
export default config;