OpenTelemetryEmbeddingGenerator class
A DelegatingEmbeddingGenerator that records OpenTelemetry spans.
- Inheritance
-
- Object
- DelegatingEmbeddingGenerator
- OpenTelemetryEmbeddingGenerator
- Annotations
-
- @Source(name: 'OpenTelemetryEmbeddingGenerator.cs', namespace: 'Microsoft.Extensions.AI', repository: 'dotnet/extensions', path: 'src/Libraries/Microsoft.Extensions.AI/Embeddings/')
Constructors
- OpenTelemetryEmbeddingGenerator(EmbeddingGenerator innerGenerator, {String? modelId, String? system})
- Creates a new OpenTelemetryEmbeddingGenerator.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- innerGenerator → EmbeddingGenerator
-
The inner generator to delegate to.
finalinherited
- modelId → String?
-
The model ID to record on spans.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- system → String?
-
The AI system name (e.g.
"openai").final
Methods
-
dispose(
) → void -
Performs application-defined tasks associated with freeing, releasing,
or resetting unmanaged resources.
inherited
-
generateEmbeddings(
{required Iterable< String> values, EmbeddingGenerationOptions? options, CancellationToken? cancellationToken}) → Future<GeneratedEmbeddings> -
Generates embeddings for the given
values.override -
getService<
T> ({Object? key}) → T? -
Gets a service of the specified type.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited