add custom separators

This commit is contained in:
Henry
2023-10-17 23:43:22 +01:00
parent d5da5240a5
commit 2f021b4837
2 changed files with 26 additions and 7 deletions
@@ -23,12 +23,6 @@ class CharacterTextSplitter_TextSplitters implements INode {
this.description = `splits only on one type of character (defaults to "\\n\\n").`
this.baseClasses = [this.type, ...getBaseClasses(CharacterTextSplitter)]
this.inputs = [
{
label: 'Separator',
name: 'separator',
type: 'string',
optional: true
},
{
label: 'Chunk Size',
name: 'chunkSize',
@@ -41,6 +35,14 @@ class CharacterTextSplitter_TextSplitters implements INode {
name: 'chunkOverlap',
type: 'number',
optional: true
},
{
label: 'Custom Separator',
name: 'separator',
type: 'string',
placeholder: `" "`,
description: 'Seperator to determine when to split the text, will override the default separator',
optional: true
}
]
}