nb.Providers.Abstractions 1.0.0

dotnet add package nb.Providers.Abstractions --version 1.0.0
                    
NuGet\Install-Package nb.Providers.Abstractions -Version 1.0.0
                    
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="nb.Providers.Abstractions" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="nb.Providers.Abstractions" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="nb.Providers.Abstractions" />
                    
Project file
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 nb.Providers.Abstractions --version 1.0.0
                    
#r "nuget: nb.Providers.Abstractions, 1.0.0"
                    
#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 nb.Providers.Abstractions@1.0.0
                    
#: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=nb.Providers.Abstractions&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=nb.Providers.Abstractions&version=1.0.0
                    
Install as a Cake Tool

nb.Providers.Abstractions

Interface for building AI provider plugins for NotaBene (nb).

Installation

dotnet add package nb.Providers.Abstractions

Usage

Implement IChatClientProvider to create a custom LLM integration:

using Microsoft.Extensions.AI;
using Microsoft.Extensions.Configuration;

namespace nb.Providers;

public class MyProvider : IChatClientProvider
{
    public string Name => "MyProvider";

    public string[] RequiredConfigKeys => new[] { "ApiKey", "Endpoint" };

    public bool CanCreate(IConfiguration config) =>
        RequiredConfigKeys.All(key => !string.IsNullOrEmpty(config[key]));

    public IChatClient CreateClient(IConfiguration config)
    {
        var apiKey = config["ApiKey"];
        var endpoint = config["Endpoint"];
        var model = config["Model"] ?? "default-model";

        // Create your IChatClient implementation here
        // Most LLM SDKs provide Microsoft.Extensions.AI adapters
        return new MyLlmClient(endpoint, apiKey, model);
    }
}

Project Setup

Your provider project needs:

<PropertyGroup>
  <TargetFramework>net8.0</TargetFramework>
  <AssemblyName>MyProvider</AssemblyName>
  <RootNamespace>nb.Providers</RootNamespace>
  <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>

<ItemGroup>
  <PackageReference Include="nb.Providers.Abstractions" Version="1.0.0" />
  <PackageReference Include="Microsoft.Extensions.AI" Version="9.9.1" />
  
</ItemGroup>

Key settings:

  • RootNamespace must be nb.Providers
  • CopyLocalLockFileAssemblies bundles dependencies with your DLL

Deployment

  1. Build your provider: dotnet build -c Release
  2. Copy all output DLLs to nb/bin/.../providers/myprovider/
  3. Add configuration to appsettings.json:
{
  "ActiveProvider": "MyProvider",
  "ChatProviders": [
    {
      "Name": "MyProvider",
      "ApiKey": "your-api-key",
      "Endpoint": "https://api.example.com"
    }
  ]
}
  1. Restart nb

Documentation

See the main repository for full documentation and example provider implementations.

Product 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 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.

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 137 1/9/2026