NPipeline.Extensions.AI.Chat
0.70.1
dotnet add package NPipeline.Extensions.AI.Chat --version 0.70.1
NuGet\Install-Package NPipeline.Extensions.AI.Chat -Version 0.70.1
<PackageReference Include="NPipeline.Extensions.AI.Chat" Version="0.70.1" />
<PackageVersion Include="NPipeline.Extensions.AI.Chat" Version="0.70.1" />
<PackageReference Include="NPipeline.Extensions.AI.Chat" />
paket add NPipeline.Extensions.AI.Chat --version 0.70.1
#r "nuget: NPipeline.Extensions.AI.Chat, 0.70.1"
#:package NPipeline.Extensions.AI.Chat@0.70.1
#addin nuget:?package=NPipeline.Extensions.AI.Chat&version=0.70.1
#tool nuget:?package=NPipeline.Extensions.AI.Chat&version=0.70.1
NPipeline.Extensions.AI.Chat
Transform and enrich NPipeline data with any Microsoft.Extensions.AI.IChatClient implementation.
Install the package
dotnet add package NPipeline.Extensions.AI.Chat
Install the package that provides your IChatClient, such as an OpenAI, Azure OpenAI, or Ollama integration.
Transform an item
Use AddChatTransform when the model response replaces the input type:
using NPipeline.Extensions.AI.Chat;
public record Comment(string Text);
public record Classification(string Category, double Confidence);
var classify = builder.AddChatTransform<Comment, Classification>(chatClient, options => options
.WithSystemPrompt("Classify the comment as Greeting, Question, Complaint, or Spam.")
.WithItemTemplate(comment => comment.Text)
.WithNativeStructuredOutput()
.WithTemperature(0.1f));
Use AddChatEnrichment when the model produces a field that you map back to the original type:
public record Article(string Body, string? Summary = null);
public record SummaryResult(string Summary);
var enrich = builder.AddChatEnrichment<Article, SummaryResult>(chatClient, options => options
.WithSystemPrompt("Summarize the article in one sentence.")
.WithItemTemplate(article => article.Body)
.WithResultMapper((article, result) => article with { Summary = result.Summary }));
Choose a processing mode
| Input shape | Transform | Enrichment |
|---|---|---|
| One item per request | AddChatTransform |
AddChatEnrichment |
| A collection per request | AddChatBatchedTransform |
AddChatBatchedEnrichment |
| A stream with internal batching | AddChatBatchedStreamTransform |
AddChatBatchedStreamEnrichment |
| Batch, enrich, and unbatch | Not applicable | AddChatBatchedEnrichmentWithUnbatch |
Batch nodes require one output for every input and retry one count mismatch with a corrective prompt. Stream-batched nodes amortize model latency without changing the surrounding pipeline item types.
Handle failures
Malformed or empty model output raises ChatTransformException. The exception includes the original item, prompt, model, and raw response when available.
Transport failures, timeouts, and cancellation propagate unchanged so NPipeline resilience policies can handle them.
License
This package is licensed under the Business Source License 1.1.
Production use is free for organizations with four or fewer developers and annual revenue of AUD 5 million or less. Larger organizations require a commercial license. Each release converts to the MIT License on its change date.
| 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 is compatible. 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
- Microsoft.Extensions.AI.Abstractions (>= 10.10.1)
- NPipeline (>= 0.70.1)
- NPipeline.Extensions.AI (>= 0.70.1)
-
net8.0
- Microsoft.Extensions.AI.Abstractions (>= 10.10.1)
- NPipeline (>= 0.70.1)
- NPipeline.Extensions.AI (>= 0.70.1)
-
net9.0
- Microsoft.Extensions.AI.Abstractions (>= 10.10.1)
- NPipeline (>= 0.70.1)
- NPipeline.Extensions.AI (>= 0.70.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.70.1 | 84 | 10/5/2026 |
| 0.70.0 | 86 | 10/1/2026 |
| 0.69.0 | 78 | 10/1/2026 |
| 0.68.0 | 84 | 10/1/2026 |
| 0.67.0 | 83 | 9/29/2026 |
| 0.66.1 | 91 | 9/28/2026 |
| 0.66.0 | 86 | 9/28/2026 |
| 0.65.1 | 99 | 9/27/2026 |
| 0.65.0 | 94 | 9/26/2026 |
| 0.64.0 | 87 | 9/26/2026 |
| 0.63.0 | 92 | 9/24/2026 |
| 0.62.0 | 83 | 9/24/2026 |
| 0.61.1 | 92 | 9/22/2026 |
| 0.61.0 | 90 | 9/22/2026 |
| 0.60.0 | 92 | 9/22/2026 |