Cisharpai 0.2.2
See the version list below for details.
dotnet add package Cisharpai --version 0.2.2
NuGet\Install-Package Cisharpai -Version 0.2.2
<PackageReference Include="Cisharpai" Version="0.2.2" />
<PackageVersion Include="Cisharpai" Version="0.2.2" />
<PackageReference Include="Cisharpai" />
paket add Cisharpai --version 0.2.2
#r "nuget: Cisharpai, 0.2.2"
#:package Cisharpai@0.2.2
#addin nuget:?package=Cisharpai&version=0.2.2
#tool nuget:?package=Cisharpai&version=0.2.2
Cisharpai
Core abstractions and shared logic for the Cisharpai unified LLM client library.
What is Cisharpai?
Cisharpai provides a common interface for interacting with multiple LLM providers (OpenAI, Azure OpenAI, Azure AI Inference, Anthropic, Cohere). Your application code depends only on this core package — provider-specific logic lives in separate packages.
Key Interfaces
IChatCompletionClient— unified chat completion across all providersIEmbeddingClient— unified text embedding across all providers
Feature Collection Pattern
Optional capabilities are discovered at runtime via IHasFeatures.Features.Get<T>():
| Feature | Description |
|---|---|
IJsonOutputFeature |
JSON Mode and Structured Outputs |
IToolCallingFeature |
Function/tool calling |
IStreamingChatFeature |
Token-by-token streaming |
IGroundedChatFeature |
RAG with document citations |
IImageEmbeddingFeature |
Image embeddings |
IMultimodalEmbeddingFeature |
Mixed text + image embeddings |
Quick Start
using Cisharpai;
using Cisharpai.Models;
// Use any provider package to get an IChatCompletionClient
var request = new ChatCompletionRequest(
Messages: [new LlmMessage(LlmRole.User, "Hello!")],
Model: "gpt-4.1-nano");
var response = await client.GetChatCompletionAsync(request);
Console.WriteLine(response.Content);
Design Principles
- No exceptions for API errors — responses use
IsSuccess/ErrorMessage - Debuggability — access
RawRequestJson/RawResponseJsonon any response - Immutability — all DTOs are immutable
recordtypes - Escape hatch —
ExtraParametersdeep-merges arbitrary JSON into requests
Provider Packages
| Package | Provider |
|---|---|
| Cisharpai.OpenAi | OpenAI |
| Cisharpai.Azure | Azure OpenAI & Azure AI Inference |
| Cisharpai.Anthropic | Anthropic (Claude) |
| Cisharpai.Cohere | Cohere |
| Cisharpai.Testing | Fake clients for unit testing |
Links
| 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 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 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.Http (>= 9.0.0)
- Microsoft.Extensions.Http.Resilience (>= 9.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.0)
-
net8.0
- Microsoft.Extensions.Http (>= 9.0.0)
- Microsoft.Extensions.Http.Resilience (>= 9.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.0)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on Cisharpai:
| Package | Downloads |
|---|---|
|
Cisharpai.Testing
Unified .NET client library for chat completions and embeddings across multiple LLM providers. |
|
|
Cisharpai.OpenAi
Unified .NET client library for chat completions and embeddings across multiple LLM providers. |
|
|
Cisharpai.Azure
Unified .NET client library for chat completions and embeddings across multiple LLM providers. |
|
|
Cisharpai.Cohere
Unified .NET client library for chat completions and embeddings across multiple LLM providers. |
|
|
Cisharpai.Anthropic
Unified .NET client library for chat completions and embeddings across multiple LLM providers. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.3.0-alpha.12.202 | 53 | 5/19/2026 |
| 0.3.0-alpha.11.197 | 62 | 5/15/2026 |
| 0.3.0-alpha.10.196 | 62 | 5/15/2026 |
| 0.3.0-alpha.9.186 | 76 | 5/8/2026 |
| 0.3.0-alpha.8.185 | 74 | 5/8/2026 |
| 0.3.0-alpha.7.164 | 62 | 5/6/2026 |
| 0.3.0-alpha.6.161 | 70 | 5/6/2026 |
| 0.3.0-alpha.5.159 | 63 | 5/6/2026 |
| 0.3.0-alpha.5.155 | 66 | 5/6/2026 |
| 0.3.0-alpha.4.156 | 64 | 5/6/2026 |
| 0.3.0-alpha.4.154 | 59 | 5/6/2026 |
| 0.3.0-alpha.3.150 | 62 | 4/30/2026 |
| 0.3.0-alpha.2.145 | 55 | 4/30/2026 |
| 0.2.2 | 178 | 4/30/2026 |
| 0.2.2-beta.1.147 | 52 | 4/30/2026 |
| 0.2.2-beta.1.146 | 53 | 4/30/2026 |
| 0.2.1 | 177 | 4/30/2026 |
| 0.2.1-beta.1.142 | 51 | 4/30/2026 |
| 0.2.1-beta.1.140 | 56 | 4/30/2026 |
| 0.2.1-beta.1.138 | 50 | 4/30/2026 |