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.ILogger? logger = default, Action<Microsoft.Extensions.AI.LoggingChatClient>? configure = default);
static member UseLogging : Microsoft.Extensions.AI.ChatClientBuilder * Microsoft.Extensions.Logging.ILogger * Action<Microsoft.Extensions.AI.LoggingChatClient> -> Microsoft.Extensions.AI.ChatClientBuilder
<Extension()>
Public Function UseLogging (builder As ChatClientBuilder, Optional logger As ILogger = Nothing, Optional configure As Action(Of LoggingChatClient) = Nothing) As ChatClientBuilder
Parameters
- builder
- ChatClientBuilder
The ChatClientBuilder.
- 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<LoggingChatClient>
An optional callback that can be used to configure the LoggingChatClient instance.
Returns
The builder
.
Applies to
Συνεργαστείτε μαζί μας στο GitHub
Μπορείτε να βρείτε την πηγή για αυτό το περιεχόμενο στο GitHub, όπου μπορείτε επίσης να δημιουργήσετε και να εξετάσετε ζητήματα και αιτήματα έλξης. Για περισσότερες πληροφορίες, ανατρέξτε στον οδηγό συνεργατών.