You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Simplify console HTTP pipeline logging using Observe/Observable
C# 14 can provide an extension method for OpenAIClientOptions directly, so we expose that instead of our own ClientOptions (less API surface). The new `Observable` creates and sets up the observers. If you already have an instance, you'd call `Observe` on it instead.
Remove unnecessary console JSON pipeline policy since we can just leverage the general purpose Observe now.
extension<TOptions>(TOptions pipelineOptions) where TOptions :ClientPipelineOptions
30
16
{
31
-
consoleOptions??=JsonConsoleOptions.Default;
32
-
33
-
if(consoleOptions.InteractiveConfirm&&ConsoleExtensions.IsConsoleInteractive&&!AnsiConsole.Confirm("Do you want to enable rich JSON console logging for HTTP pipeline messages?"))
if(consoleOptions.InteractiveConfirm&&ConsoleExtensions.IsConsoleInteractive&&!AnsiConsole.Confirm("Do you want to enable rich JSON console logging for HTTP pipeline messages?"))
56
-
returnbuilder;
28
+
if(consoleOptions.InteractiveConfirm&&ConsoleExtensions.IsConsoleInteractive&&!AnsiConsole.Confirm("Do you want to enable rich JSON console logging for HTTP pipeline messages?"))
if(consoleOptions.InteractiveConfirm&&ConsoleExtensions.IsConsoleInteractive&&!AnsiConsole.Confirm("Do you want to enable rich JSON console logging for HTTP pipeline messages?"))
0 commit comments