Jaa


AnonymousDelegatingEmbeddingGenerator<TInput,TEmbedding> Constructor

Definition

Initializes a new instance of the AnonymousDelegatingEmbeddingGenerator<TInput,TEmbedding> class.

public:
 AnonymousDelegatingEmbeddingGenerator(Microsoft::Extensions::AI::IEmbeddingGenerator<TInput, TEmbedding> ^ innerGenerator, Func<System::Collections::Generic::IEnumerable<TInput> ^, Microsoft::Extensions::AI::EmbeddingGenerationOptions ^, Microsoft::Extensions::AI::IEmbeddingGenerator<TInput, TEmbedding> ^, System::Threading::CancellationToken, System::Threading::Tasks::Task<Microsoft::Extensions::AI::GeneratedEmbeddings<TEmbedding> ^> ^> ^ generateFunc);
public AnonymousDelegatingEmbeddingGenerator (Microsoft.Extensions.AI.IEmbeddingGenerator<TInput,TEmbedding> innerGenerator, Func<System.Collections.Generic.IEnumerable<TInput>,Microsoft.Extensions.AI.EmbeddingGenerationOptions?,Microsoft.Extensions.AI.IEmbeddingGenerator<TInput,TEmbedding>,System.Threading.CancellationToken,System.Threading.Tasks.Task<Microsoft.Extensions.AI.GeneratedEmbeddings<TEmbedding>>> generateFunc);
new Microsoft.Extensions.AI.AnonymousDelegatingEmbeddingGenerator<'Input, 'Embedding (requires 'Embedding :> Microsoft.Extensions.AI.Embedding)> : Microsoft.Extensions.AI.IEmbeddingGenerator<'Input, 'Embedding (requires 'Embedding :> Microsoft.Extensions.AI.Embedding)> * Func<seq<'Input>, Microsoft.Extensions.AI.EmbeddingGenerationOptions, Microsoft.Extensions.AI.IEmbeddingGenerator<'Input, 'Embedding>, System.Threading.CancellationToken, System.Threading.Tasks.Task<Microsoft.Extensions.AI.GeneratedEmbeddings<'Embedding>>> -> Microsoft.Extensions.AI.AnonymousDelegatingEmbeddingGenerator<'Input, 'Embedding (requires 'Embedding :> Microsoft.Extensions.AI.Embedding)>
Public Sub New (innerGenerator As IEmbeddingGenerator(Of TInput, TEmbedding), generateFunc As Func(Of IEnumerable(Of TInput), EmbeddingGenerationOptions, IEmbeddingGenerator(Of TInput, TEmbedding), CancellationToken, Task(Of GeneratedEmbeddings(Of TEmbedding))))

Parameters

innerGenerator
IEmbeddingGenerator<TInput,TEmbedding>

The inner generator.

Exceptions

generateFunc is null.

Applies to