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
Tee yhteistyötä kanssamme GitHubissa
Tämän sisällön lähde on GitHubissa, jossa voit myös luoda ja tarkastella ongelmia ja pull-pyyntöjä. Katso lisätietoja osallistujan oppaasta.