Nabs.Launchpad.Core.Ai.Clients
10.0.234
Prefix Reserved
dotnet add package Nabs.Launchpad.Core.Ai.Clients --version 10.0.234
NuGet\Install-Package Nabs.Launchpad.Core.Ai.Clients -Version 10.0.234
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="Nabs.Launchpad.Core.Ai.Clients" Version="10.0.234" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Nabs.Launchpad.Core.Ai.Clients" Version="10.0.234" />
<PackageReference Include="Nabs.Launchpad.Core.Ai.Clients" />
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 Nabs.Launchpad.Core.Ai.Clients --version 10.0.234
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Nabs.Launchpad.Core.Ai.Clients, 10.0.234"
#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 Nabs.Launchpad.Core.Ai.Clients@10.0.234
#: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=Nabs.Launchpad.Core.Ai.Clients&version=10.0.234
#tool nuget:?package=Nabs.Launchpad.Core.Ai.Clients&version=10.0.234
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Nabs.Launchpad.Core.Ai.Clients
Nabs.Launchpad.Core.Ai.Clients gives you production-ready IAIClientFactory implementations and DI extensions so you can switch between Azure Foundry, local OpenAI-compatible endpoints, and deterministic simulators with minimal code changes.
Installation
dotnet add package Nabs.Launchpad.Core.Ai.Clients
The Problem
// 1) AI client wiring duplicated across apps
var openAiClient = new OpenAIClient(new ApiKeyCredential(key), new OpenAIClientOptions { Endpoint = new Uri(url) });
var chat = openAiClient.GetChatClient(model).AsIChatClient();
// 2) Environment switching is brittle and scattered
if (env.IsDevelopment())
{
// local endpoint
}
else
{
// azure endpoint
}
// 3) Tests require live services or heavy mocks
// No deterministic queue/keyed response simulator for chat streaming behavior.
// 4) Missing response setup causes runtime failures deep in execution flow
// InvalidOperationException thrown too late, hard to diagnose.
Features
- Factory-based AI client resolution through
IAIClientFactory. - Azure Foundry integration with
AzureFoundryProjectClientFactoryandDefaultAzureCredential. - Local OpenAI-compatible integration with
LocalOpenAIClientFactory. - Deterministic simulation with
AIChatClientSimulatorfor streaming and keyed responses. - DI convenience extensions via
AddAzureFoundryClientFactory,AddLocalOpenAIClientFactory, andAddSimulatorClientFactory.
Usage
using Microsoft.Extensions.DependencyInjection;
using Nabs.Launchpad.Core.Ai;
using Nabs.Launchpad.Core.Ai.Clients;
var services = new ServiceCollection();
services.AddAzureFoundryClientFactory("https://my-project.services.ai.azure.com/api/projects/my-project");
using var provider = services.BuildServiceProvider();
var factory = provider.GetRequiredService<IAIClientFactory>();
var chatClient = factory.GetChatClient("gpt-4.1-mini");
using Microsoft.Extensions.DependencyInjection;
using Nabs.Launchpad.Core.Ai;
using Nabs.Launchpad.Core.Ai.Clients;
var services = new ServiceCollection();
services.AddSimulatorClientFactory(sim =>
{
sim.AddTextResponse("First simulated response")
.AddKeyedTextResponse("status", "All systems green");
});
using var provider = services.BuildServiceProvider();
var factory = provider.GetRequiredService<IAIClientFactory>();
var chatClient = factory.GetChatClient("ignored-by-simulator");
Configuration
- Azure Foundry: pass your AI project URL to
AddAzureFoundryClientFactory(string aiProjectUrl). - Local endpoint: pass your local OpenAI-compatible URL to
AddLocalOpenAIClientFactory(string aiProjectUrl). - Simulator: configure queued or keyed responses in
AddSimulatorClientFactory(Action<AIChatClientSimulator>).
Project Structure
ProjectExtensions- dependency injection extension methods for registering factory implementations.AzureFoundryProjectClientFactory- createsIChatClientinstances from Azure AI Project OpenAI clients.LocalOpenAIClientFactory- creates local OpenAI-compatibleIChatClientinstances.SimulatorClientFactory- returns anAIChatClientSimulatorimplementation ofIChatClient.AIChatClientSimulator- deterministic test client with queued and keyed streaming responses.
License
Copyright (c) Net Advantage Business Solutions.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Azure.AI.Projects (>= 2.1.0-beta.3)
- Azure.Identity (>= 1.21.0)
- Microsoft.Agents.AI.OpenAI (>= 1.8.0)
- Nabs.Launchpad.Core.Ai (>= 10.0.234)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.