CodeDesignPlus.Net.AI
1.0.0-beta.12898
This is a prerelease version of CodeDesignPlus.Net.AI.
There is a newer prerelease version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package CodeDesignPlus.Net.AI --version 1.0.0-beta.12898
NuGet\Install-Package CodeDesignPlus.Net.AI -Version 1.0.0-beta.12898
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CodeDesignPlus.Net.AI" Version="1.0.0-beta.12898" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CodeDesignPlus.Net.AI" Version="1.0.0-beta.12898" />
<PackageReference Include="CodeDesignPlus.Net.AI" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CodeDesignPlus.Net.AI --version 1.0.0-beta.12898
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CodeDesignPlus.Net.AI, 1.0.0-beta.12898"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CodeDesignPlus.Net.AI@1.0.0-beta.12898
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CodeDesignPlus.Net.AI&version=1.0.0-beta.12898&prerelease
#tool nuget:?package=CodeDesignPlus.Net.AI&version=1.0.0-beta.12898&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
CodeDesignPlus.Net.AI
Overview
CodeDesignPlus.Net.AI provides a unified interface for integrating AI/LLM providers (Claude, OpenAI, Azure OpenAI) into .NET microservices. It supports configurable agents with system prompts, model selection, and provider routing via appsettings.json.
Features
- Multi-Provider Support: Claude (Anthropic), OpenAI, and Azure OpenAI out of the box
- Agent Configuration: Define named agents with system prompts, temperature, max tokens, and provider selection
- Provider Abstraction:
IAIProviderinterface allows custom provider implementations - Options Pattern: Standard .NET configuration via
appsettings.jsonwith validation - Dependency Injection:
services.AddAI(configuration)registers all services
Installation
dotnet add package CodeDesignPlus.Net.AI
Configuration
{
"AI": {
"DefaultProvider": "Claude",
"Providers": {
"Claude": {
"ApiKey": "sk-ant-...",
"Model": "claude-sonnet-4-5-20250514"
},
"OpenAI": {
"ApiKey": "sk-...",
"Model": "gpt-4o"
},
"AzureOpenAI": {
"ApiKey": "...",
"Model": "gpt-4o",
"Endpoint": "https://your-resource.openai.azure.com/"
}
},
"Agents": {
"EmailDesigner": {
"Provider": "Claude",
"SystemPrompt": "You are an expert HTML email template designer...",
"MaxTokens": 4096,
"Temperature": 0.7
}
}
}
}
Usage
Registration
// In Startup.cs or Program.cs
services.AddAI(configuration);
Consuming the Service
public class MyCommandHandler(IAIService ai) : IRequestHandler<MyCommand>
{
public async Task Handle(MyCommand request, CancellationToken cancellationToken)
{
var response = await ai.ChatAsync("EmailDesigner", "Create a welcome email template", cancellationToken);
if (response.Success)
{
// Use response.Content (the AI-generated text/HTML)
}
}
}
Multi-turn Conversations
var messages = new List<ChatMessage>
{
new(ChatRole.User, "Create a purchase receipt email"),
new(ChatRole.Assistant, "<html>...</html>"),
new(ChatRole.User, "Change the header color to blue"),
};
var response = await ai.ChatAsync("EmailDesigner", messages, cancellationToken);
Architecture
IAIService (main entry point)
↓
AIService (orchestrator - resolves agent config + provider)
├── ClaudeProvider (Anthropic SDK)
├── OpenAIProvider (OpenAI SDK)
└── AzureOpenAIProvider (Azure.AI.OpenAI SDK)
Documentation
For more information, visit https://doc.codedesignplus.com
License
This project is licensed under the GNU Lesser General Public License v3.0. See LICENSE.md for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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 was computed. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net9.0
- Anthropic.SDK (>= 3.2.2)
- Azure.AI.DocumentIntelligence (>= 1.0.0)
- Azure.AI.OpenAI (>= 2.1.0)
- CodeDesignPlus.Net.AI.Abstractions (>= 1.0.0-beta.12898)
- Microsoft.Extensions.Http (>= 9.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 9.0.0)
- Microsoft.Extensions.Options.DataAnnotations (>= 9.0.0)
- OpenAI (>= 2.1.0)
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 |
|---|---|---|
| 1.0.0-beta.12900 | 38 | 6/20/2026 |
| 1.0.0-beta.12898 | 43 | 6/19/2026 |
| 1.0.0-beta.12897 | 57 | 6/19/2026 |