Feat: Add StringTransform operator #3221 (#8520)

### What problem does this PR solve?

Feat: Add StringTransform operator #3221

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-06-27 09:27:28 +08:00
committed by GitHub
parent 2990779d59
commit f7b6c4ca99
9 changed files with 273 additions and 8 deletions

View File

@ -87,6 +87,7 @@ export enum Operator {
Tool = 'Tool',
TavilySearch = 'TavilySearch',
UserFillUp = 'UserFillUp',
StringTransform = 'StringTransform',
}
export const SwitchLogicOperatorOptions = ['and', 'or'];
@ -704,6 +705,32 @@ export const initialUserFillUpValues = {
inputs: [],
};
export enum StringTransformMethod {
Merge = 'merge',
Split = 'split',
}
export enum StringTransformDelimiter {
Comma = ',',
Semicolon = ';',
Period = '.',
LineBreak = '\n',
Tab = '\t',
Space = ' ',
}
export const initialStringTransformValues = {
method: StringTransformMethod.Merge,
split_ref: '',
script: '',
delimiters: [],
outputs: {
result: {
type: 'string',
},
},
};
export enum TavilySearchDepth {
Basic = 'basic',
Advanced = 'advanced',
@ -869,6 +896,7 @@ export const NodeMap = {
[Operator.Tool]: 'toolNode',
[Operator.TavilySearch]: 'ragNode',
[Operator.UserFillUp]: 'ragNode',
[Operator.StringTransform]: 'ragNode',
};
export enum BeginQueryType {