Class EmbeddingTransformation<TInput>
Inheritance EmbeddingTransformation<TInput>
Namespace : ETLBox.AIAssembly : ETLBox.AI.dll public class EmbeddingTransformation < TInput > : DataFlowTransformation < TInput , TInput >, IDataFlowTransformation < TInput , TInput >, IDataFlowSource < TInput >, IDataFlowSource , IDataFlowDestination < TInput >, IDataFlowDestination , IDataFlowComponent , ILoggableTask Type Parameters Name Description TInput Type of ingoing and outgoing data.
Constructors
Declaration public EmbeddingTransformation ()
Declaration public EmbeddingTransformation ( IEmbeddingGenerator < string , Embedding < float >> embeddingGenerator ) Parameters Type Name Description IEmbeddingGenerator <string , Embedding <float >>embeddingGenerator
Properties Optional options passed to the embedding generator, e.g. model id or dimensions.
Declaration public EmbeddingGenerationOptions EmbeddingGenerationOptions { get ; set ; } Property Value Type Description EmbeddingGenerationOptions
Embedding generator created by the caller.
Declaration public IEmbeddingGenerator < string , Embedding < float >> EmbeddingGenerator { get ; set ; } Property Value Type Description IEmbeddingGenerator <string , Embedding <float >>
SourceBlock from the underlying TPL.Dataflow which is used as output buffer for the component.
Declaration public override ISourceBlock < TInput > SourceBlock { get ; } Property Value Overrides TargetBlock from the underlying TPL.Dataflow which is used as input buffer for the component.
Declaration public override ITargetBlock < TInput > TargetBlock { get ; } Property Value Overrides TextPropertyName# Only for ExpandoObject : property that contains the text to embed. Default is "Text".
Declaration public string TextPropertyName { get ; set ; } Property Value TextSelector# Selects the text that is sent to the embedding generator.
Declaration public Func < TInput , string > TextSelector { get ; set ; } Property Value Only for ExpandoObject : property that receives the vector. Default is "Embedding".
Declaration public string VectorPropertyName { get ; set ; } Property Value Writes the returned vector into the row.
Declaration public Action < TInput , ReadOnlyMemory < float >> VectorSetter { get ; set ; } Property Value Methods
Declaration protected override void CheckParameter () Overrides
Declaration protected override void CleanUpOnFaulted ( Exception e ) Parameters Overrides
Declaration protected override void CleanUpOnSuccess () Overrides
Declaration protected override void InitComponent () Overrides
Declaration protected override void PrepareParameterForCheck () Overrides
Declaration protected override void Reset () Overrides Implements#