2024-04-08 18:51:46 +08:00
|
|
|
import type { Block } from '../types'
|
|
|
|
import { BlockEnum } from '../types'
|
|
|
|
import { BlockClassificationEnum } from './types'
|
|
|
|
|
|
|
|
export const BLOCKS: Block[] = [
|
|
|
|
{
|
|
|
|
classification: BlockClassificationEnum.Default,
|
|
|
|
type: BlockEnum.Start,
|
|
|
|
title: 'Start',
|
|
|
|
description: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
classification: BlockClassificationEnum.Default,
|
|
|
|
type: BlockEnum.LLM,
|
|
|
|
title: 'LLM',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
classification: BlockClassificationEnum.Default,
|
|
|
|
type: BlockEnum.KnowledgeRetrieval,
|
|
|
|
title: 'Knowledge Retrieval',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
classification: BlockClassificationEnum.Default,
|
|
|
|
type: BlockEnum.End,
|
|
|
|
title: 'End',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
classification: BlockClassificationEnum.Default,
|
|
|
|
type: BlockEnum.Answer,
|
|
|
|
title: 'Direct Answer',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
classification: BlockClassificationEnum.QuestionUnderstand,
|
|
|
|
type: BlockEnum.QuestionClassifier,
|
|
|
|
title: 'Question Classifier',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
classification: BlockClassificationEnum.Logic,
|
|
|
|
type: BlockEnum.IfElse,
|
|
|
|
title: 'IF/ELSE',
|
|
|
|
},
|
2024-05-27 21:57:08 +08:00
|
|
|
{
|
|
|
|
classification: BlockClassificationEnum.Logic,
|
|
|
|
type: BlockEnum.Iteration,
|
|
|
|
title: 'Iteration',
|
|
|
|
},
|
2024-04-08 18:51:46 +08:00
|
|
|
{
|
|
|
|
classification: BlockClassificationEnum.Transform,
|
|
|
|
type: BlockEnum.Code,
|
|
|
|
title: 'Code',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
classification: BlockClassificationEnum.Transform,
|
|
|
|
type: BlockEnum.TemplateTransform,
|
|
|
|
title: 'Templating Transform',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
classification: BlockClassificationEnum.Transform,
|
2024-05-27 21:57:08 +08:00
|
|
|
type: BlockEnum.VariableAggregator,
|
|
|
|
title: 'Variable Aggregator',
|
|
|
|
},
|
2024-10-21 10:32:37 +08:00
|
|
|
{
|
|
|
|
classification: BlockClassificationEnum.Transform,
|
|
|
|
type: BlockEnum.DocExtractor,
|
|
|
|
title: 'Doc Extractor',
|
|
|
|
},
|
2024-08-13 14:44:10 +08:00
|
|
|
{
|
|
|
|
classification: BlockClassificationEnum.Transform,
|
|
|
|
type: BlockEnum.Assigner,
|
|
|
|
title: 'Variable Assigner',
|
|
|
|
},
|
2024-05-27 21:57:08 +08:00
|
|
|
{
|
|
|
|
classification: BlockClassificationEnum.Transform,
|
|
|
|
type: BlockEnum.ParameterExtractor,
|
|
|
|
title: 'Parameter Extractor',
|
2024-04-08 18:51:46 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
classification: BlockClassificationEnum.Utilities,
|
|
|
|
type: BlockEnum.HttpRequest,
|
|
|
|
title: 'HTTP Request',
|
|
|
|
},
|
2024-10-21 10:32:37 +08:00
|
|
|
{
|
|
|
|
classification: BlockClassificationEnum.Utilities,
|
|
|
|
type: BlockEnum.ListFilter,
|
|
|
|
title: 'List Filter',
|
|
|
|
},
|
2024-04-08 18:51:46 +08:00
|
|
|
]
|
|
|
|
|
|
|
|
export const BLOCK_CLASSIFICATIONS: string[] = [
|
|
|
|
BlockClassificationEnum.Default,
|
|
|
|
BlockClassificationEnum.QuestionUnderstand,
|
|
|
|
BlockClassificationEnum.Logic,
|
|
|
|
BlockClassificationEnum.Transform,
|
|
|
|
BlockClassificationEnum.Utilities,
|
|
|
|
]
|