EmbeddingGeneratorBuilder class
Builds a pipeline of embedding generator middleware.
The pipeline is composed by calling use one or more times, then calling build to produce the final EmbeddingGenerator. Middleware factories are applied in reverse order so that the first call to use produces the outermost wrapper.
- Available extensions
Constructors
- EmbeddingGeneratorBuilder(EmbeddingGenerator innerGenerator)
-
Creates a new EmbeddingGeneratorBuilder wrapping
innerGenerator. - EmbeddingGeneratorBuilder.fromFactory(InnerEmbeddingGeneratorFactory innerFactory)
-
Creates a new EmbeddingGeneratorBuilder from a factory function.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
build(
[ServiceProvider? services]) → EmbeddingGenerator - Builds the pipeline and returns the outermost EmbeddingGenerator.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
use(
EmbeddingGenerator factory(EmbeddingGenerator)) → EmbeddingGeneratorBuilder - Adds a middleware factory to the pipeline.
-
useOpenTelemetry(
{String? modelId, String? system}) → EmbeddingGeneratorBuilder -
Available on EmbeddingGeneratorBuilder, provided by the OpenTelemetryEmbeddingGeneratorBuilderExtensions extension
Adds an OpenTelemetryEmbeddingGenerator to the pipeline.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited