ANcpLua.Agents.BitNet.Core 4.0.3

Suggested Alternatives

ANcpLua.Agents.Hosting.BitNet

Additional Details

Merged into ANcpLua.Agents.Hosting.BitNet in 5.0.0. The types always lived in the ANcpLua.Agents.Hosting.BitNet namespace, so migrating is a package-reference swap with zero code changes.

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

ANcpLua.Agents.BitNet.Core

The client core for the BitNet (bitnet.cpp / llama-server) stack — the shared base that both ANcpLua.Agents.Hosting.BitNet and ANcpLua.Agents.Testing.BitNet build on, with no hosting stack and no provider SDK — it speaks the OpenAI-compatible wire protocol directly over HttpClient + System.Text.Json, exposing only the vendor-neutral IChatClient.

Type What it does
BitNetClientOptions Endpoint / API-path / model config, with BITNET_URL · BITNET_API_PATH · BITNET_MODEL environment overrides.
BitNetChatClient A dependency-free IChatClient that POSTs straight to the OpenAI-compatible /chat/completions endpoint. No provider SDK; emits max_tokens natively.
BitNetChatClientFactory Create(options) → a configured BitNetChatClient as IChatClient.
LegacyMaxTokensPolicy Obsolete. Was an OpenAI-SDK pipeline shim mirroring max_completion_tokensmax_tokens; the agnostic client emits max_tokens natively, so it is unused. Kept for compatibility.
using ANcpLua.Agents.Hosting.BitNet;
using Microsoft.Extensions.AI;

IChatClient client = BitNetChatClientFactory.Create(new BitNetClientOptions
{
    Endpoint = new Uri("http://localhost:8080"),
    Model    = "bitnet-b1.58-2B-4T",
});

The types live in the ANcpLua.Agents.Hosting.BitNet namespace for API stability (shipped that way in 4.0.0-preview.1); this package is the assembly split-out so the client core can be taken without the hosting stack.

BitNet is a local test-double / system-under-test — not an authoritative judge. See docs/bitnet-not-a-judge.md.

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

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.