Embedder class

Processes text into vector embeddings for semantic search and similarity analysis.

The Embedder class takes raw text, divides it into chunks, and then generates vector embeddings for each chunk using the specified embed driver and model. This is a key component in building semantic search capabilities and enabling retrieval-augmented generation (RAG) systems.

Constructors

Embedder.new({required Future<List<double>> embedder(String content), required Chunker chunker, int overlap = 500})
Creates a new Embedder with the specified parameters.

Properties

chunker Chunker
The chunker used to divide text into manageable pieces
final
embedder Future<List<double>> Function(String content)
The driver used to generate embeddings
final
hashCode int
The hash code for this object.
no setterinherited
overlap int
The amount of text overlap between chunks in characters
final
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
toString() String
A string representation of this object.
inherited
transform(Stream<String> rawFeed, {int semaphoreBuffer = 4}) Stream<EmbeddedChunk>
Transforms a stream of raw text into a stream of embedded chunks.

Operators

operator ==(Object other) bool
The equality operator.
inherited