LoggingEmbeddingGeneratorBuilderExtensions.UseLogging<TInput,TEmbedding> Method
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.
Adds logging to the embedding generator pipeline.
public static Microsoft.Extensions.AI.EmbeddingGeneratorBuilder<TInput,TEmbedding> UseLogging<TInput,TEmbedding> (this Microsoft.Extensions.AI.EmbeddingGeneratorBuilder<TInput,TEmbedding> builder, Microsoft.Extensions.Logging.ILogger? logger = default, Action<Microsoft.Extensions.AI.LoggingEmbeddingGenerator<TInput,TEmbedding>>? configure = default) where TEmbedding : Microsoft.Extensions.AI.Embedding;
static member UseLogging : Microsoft.Extensions.AI.EmbeddingGeneratorBuilder<'Input, 'Embedding (requires 'Embedding :> Microsoft.Extensions.AI.Embedding)> * Microsoft.Extensions.Logging.ILogger * Action<Microsoft.Extensions.AI.LoggingEmbeddingGenerator<'Input, 'Embedding>> -> Microsoft.Extensions.AI.EmbeddingGeneratorBuilder<'Input, 'Embedding (requires 'Embedding :> Microsoft.Extensions.AI.Embedding)> (requires 'Embedding :> Microsoft.Extensions.AI.Embedding)
<Extension()>
Public Function UseLogging(Of TInput, TEmbedding) (builder As EmbeddingGeneratorBuilder(Of TInput, TEmbedding), Optional logger As ILogger = Nothing, Optional configure As Action(Of LoggingEmbeddingGenerator(Of TInput, TEmbedding)) = Nothing) As EmbeddingGeneratorBuilder(Of TInput, TEmbedding)
Type Parameters
- TInput
Specifies the type of the input passed to the generator.
- TEmbedding
Specifies the type of the embedding instance produced by the generator.
Parameters
- logger
- ILogger
An optional ILogger with which logging should be performed. If not supplied, an instance will be resolved from the service provider.
- configure
- Action<LoggingEmbeddingGenerator<TInput,TEmbedding>>
An optional callback that can be used to configure the LoggingEmbeddingGenerator<TInput,TEmbedding> instance.
Returns
The builder
.
Applies to
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET