Preparing search index...
The search index is not available
LangChain.js - v0.2.0-rc.1
LangChain.js
langchain-textsplitters
TextSplitter
Class TextSplitter
Abstract
Hierarchy (
view full
)
BaseDocumentTransformer
TextSplitter
CharacterTextSplitter
RecursiveCharacterTextSplitter
TokenTextSplitter
Implements
TextSplitterParams
Index
Constructors
constructor
Properties
chunk
Overlap
chunk
Size
keep
Separator
length
Function
Methods
create
Documents
merge
Splits
split
Documents
split
Text
transform
Documents
split
On
Separator
Constructors
constructor
new
Text
Splitter
(
fields
?
)
:
TextSplitter
Parameters
Optional
fields
:
Partial
<
TextSplitterParams
>
Returns
TextSplitter
Properties
chunk
Overlap
chunk
Overlap
:
number
= 200
chunk
Size
chunk
Size
:
number
= 1000
keep
Separator
keep
Separator
:
boolean
= false
length
Function
length
Function
:
(
(
text
)
=>
number
)
|
(
(
text
)
=>
Promise
<
number
>
)
Type declaration
(
text
)
:
number
Parameters
text
:
string
Returns
number
Type declaration
(
text
)
:
Promise
<
number
>
Parameters
text
:
string
Returns
Promise
<
number
>
Methods
create
Documents
create
Documents
(
texts
,
metadatas
?
,
chunkHeaderOptions
?
)
:
Promise
<
Document
<
Record
<
string
,
any
>
>
[]
>
Parameters
texts
:
string
[]
metadatas
:
Record
<
string
,
any
>
[]
= []
chunkHeaderOptions
:
TextSplitterChunkHeaderOptions
= {}
Returns
Promise
<
Document
<
Record
<
string
,
any
>
>
[]
>
merge
Splits
merge
Splits
(
splits
,
separator
)
:
Promise
<
string
[]
>
Parameters
splits
:
string
[]
separator
:
string
Returns
Promise
<
string
[]
>
split
Documents
split
Documents
(
documents
,
chunkHeaderOptions
?
)
:
Promise
<
Document
<
Record
<
string
,
any
>
>
[]
>
Parameters
documents
:
Document
<
Record
<
string
,
any
>
>
[]
chunkHeaderOptions
:
TextSplitterChunkHeaderOptions
= {}
Returns
Promise
<
Document
<
Record
<
string
,
any
>
>
[]
>
Abstract
split
Text
split
Text
(
text
)
:
Promise
<
string
[]
>
Parameters
text
:
string
Returns
Promise
<
string
[]
>
transform
Documents
transform
Documents
(
documents
,
chunkHeaderOptions
?
)
:
Promise
<
Document
<
Record
<
string
,
any
>
>
[]
>
Parameters
documents
:
Document
<
Record
<
string
,
any
>
>
[]
chunkHeaderOptions
:
TextSplitterChunkHeaderOptions
= {}
Returns
Promise
<
Document
<
Record
<
string
,
any
>
>
[]
>
Protected
split
On
Separator
split
On
Separator
(
text
,
separator
)
:
string
[]
Parameters
text
:
string
separator
:
string
Returns
string
[]
Settings
Member Visibility
Protected
Inherited
Theme
OS
Light
Dark
On This Page
constructor
chunk
Overlap
chunk
Size
keep
Separator
length
Function
create
Documents
merge
Splits
split
Documents
split
Text
transform
Documents
split
On
Separator
LangChain.js - v0.2.0-rc.1
langchain-anthropic
langchain-azure-openai
langchain-cloudflare
langchain-cohere
langchain-community
agents/toolkits
aws_sfn
base
connery
caches
cloudflare_kv
ioredis
momento
upstash_redis
callbacks/handlers
llmonitor
lunary
chains/graph_qa/cypher
chat_models
alibaba_tongyi
baiduwenxin
Loading...
Generated using
TypeDoc