LoggingChatClientBuilderExtensions.UseLogging 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 chat client pipeline.
public static Microsoft.Extensions.AI.ChatClientBuilder UseLogging(this Microsoft.Extensions.AI.ChatClientBuilder builder, Microsoft.Extensions.Logging.ILoggerFactory? loggerFactory = default, Action<Microsoft.Extensions.AI.LoggingChatClient>? configure = default);
static member UseLogging : Microsoft.Extensions.AI.ChatClientBuilder * Microsoft.Extensions.Logging.ILoggerFactory * Action<Microsoft.Extensions.AI.LoggingChatClient> -> Microsoft.Extensions.AI.ChatClientBuilder
<Extension()>
Public Function UseLogging (builder As ChatClientBuilder, Optional loggerFactory As ILoggerFactory = Nothing, Optional configure As Action(Of LoggingChatClient) = Nothing) As ChatClientBuilder
Parameters
- builder
- ChatClientBuilder
The ChatClientBuilder.
- loggerFactory
- ILoggerFactory
An optional ILoggerFactory used to create a logger with which logging should be performed. If not supplied, a required instance will be resolved from the service provider.
- configure
- Action<LoggingChatClient>
An optional callback that can be used to configure the LoggingChatClient instance.
Returns
The builder
.
Applies to
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET