AnonymousDelegatingEmbeddingGenerator<TInput,TEmbedding> Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
- generateFunc
- Func<IEnumerable<TInput>,EmbeddingGenerationOptions,IEmbeddingGenerator<TInput,TEmbedding>,CancellationToken,Task<GeneratedEmbeddings<TEmbedding>>>
A delegate that provides the implementation for GenerateAsync(IEnumerable<TInput>, EmbeddingGenerationOptions, CancellationToken).
Exceptions
generateFunc
is null
.
Applies to
Συνεργαστείτε μαζί μας στο GitHub
Μπορείτε να βρείτε την πηγή για αυτό το περιεχόμενο στο GitHub, όπου μπορείτε επίσης να δημιουργήσετε και να εξετάσετε ζητήματα και αιτήματα έλξης. Για περισσότερες πληροφορίες, ανατρέξτε στον οδηγό συνεργατών.