Devlooped.Extensions.AI.Console
2.0.3
Prefix Reserved
dotnet add package Devlooped.Extensions.AI.Console --version 2.0.3
NuGet\Install-Package Devlooped.Extensions.AI.Console -Version 2.0.3
<PackageReference Include="Devlooped.Extensions.AI.Console" Version="2.0.3" />
<PackageVersion Include="Devlooped.Extensions.AI.Console" Version="2.0.3" />
<PackageReference Include="Devlooped.Extensions.AI.Console" />
paket add Devlooped.Extensions.AI.Console --version 2.0.3
#r "nuget: Devlooped.Extensions.AI.Console, 2.0.3"
#:package Devlooped.Extensions.AI.Console@2.0.3
#addin nuget:?package=Devlooped.Extensions.AI.Console&version=2.0.3
#tool nuget:?package=Devlooped.Extensions.AI.Console&version=2.0.3
Console Logging
Additional UseJsonConsoleLogging extension for rich JSON-formatted console logging
of IChatClient requests and responses are provided at two levels:
- Chat pipeline: similar to
UseLogging. - HTTP pipeline: lowest possible layer before the request is sent to the AI service,
can capture all requests and responses. Can also be used with other Azure SDK-based
clients that leverage
ClientPipelineOptions.
Rich JSON formatting is provided by Spectre.Console
The HTTP pipeline logging can be enabled by calling UseJsonConsoleLogging on the
client options passed to the client constructor:
var openai = new OpenAIClient(
Environment.GetEnvironmentVariable("OPENAI_API_KEY")!,
new OpenAIClientOptions().UseJsonConsoleLogging());
Both alternatives receive an optional JsonConsoleOptions instance to configure
the output, including truncating or wrapping long messages, setting panel style,
and more.
The chat pipeline logging is added similar to other pipeline extensions:
IChatClient chat = new OpenAIChatClient(Environment.GetEnvironmentVariable("OPENAI_API_KEY")!, "gpt-5.2");
.AsBuilder()
.UseOpenTelemetry()
// other extensions...
.UseJsonConsoleLogging(new JsonConsoleOptions()
{
// Formatting options...
Border = BoxBorder.None,
WrapLength = 80,
})
.Build();
By default, the logging will only be performed if the console is interactive.
Open Source Maintenance Fee
To ensure the long-term sustainability of this project, users of this package who generate revenue must pay an Open Source Maintenance Fee. While the source code is freely available under the terms of the License, this package and other aspects of the project require adherence to the Maintenance Fee.
To pay the Maintenance Fee, become a Sponsor at the proper OSMF tier. A single fee covers all of Devlooped packages.
Sponsors
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Devlooped.Extensions.AI (>= 2.0.3)
- Spectre.Console (>= 0.54.0)
- Spectre.Console.Json (>= 0.54.0)
-
net8.0
- Devlooped.Extensions.AI (>= 2.0.3)
- Spectre.Console (>= 0.54.0)
- Spectre.Console.Json (>= 0.54.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.