DocumentChunker class
Splits long text into manageable chunks for vector embeddings.
Constructors
- DocumentChunker({int chunkSize = 1000, int chunkOverlap = 200})
Properties
- chunkOverlap → int
-
The number of overlapping characters between consecutive chunks.
final
- chunkSize → int
-
The maximum size of each chunk (in characters).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
splitText(
String text, {Map< String, dynamic> metadata = const {}}) → List<AIDocument> - Splits a single string of text into multiple AIDocument chunks.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited