OutWit.Shared.Intelligence.Providers
1.1.0
dotnet add package OutWit.Shared.Intelligence.Providers --version 1.1.0
NuGet\Install-Package OutWit.Shared.Intelligence.Providers -Version 1.1.0
<PackageReference Include="OutWit.Shared.Intelligence.Providers" Version="1.1.0" />
<PackageVersion Include="OutWit.Shared.Intelligence.Providers" Version="1.1.0" />
<PackageReference Include="OutWit.Shared.Intelligence.Providers" />
paket add OutWit.Shared.Intelligence.Providers --version 1.1.0
#r "nuget: OutWit.Shared.Intelligence.Providers, 1.1.0"
#:package OutWit.Shared.Intelligence.Providers@1.1.0
#addin nuget:?package=OutWit.Shared.Intelligence.Providers&version=1.1.0
#tool nuget:?package=OutWit.Shared.Intelligence.Providers&version=1.1.0
OutWit.Shared.Intelligence.Providers
Vendor-neutral contract for language-model providers in OutWit hosts. A caller owns its prompts, its answer schema and the validation of answers; a provider only sends one structured request and reports the answer, or a failure that carries no vendor text and no credential.
The pieces
| Type | What |
|---|---|
IIntelligenceProvider |
SendAsync(IntelligenceRequest) returns an IntelligenceResponse: the text (when the model gave one text part), why it stopped, the model and the tokens |
IntelligenceRequest |
the instructions, the content, the answer's JSON schema, the output limit, a model; and (1.1.0) how much the model may think (IntelligenceReasoning: Default, None, Low, Medium, High), a temperature and a seed, each sent where the service takes it |
IIntelligenceProviderFactory |
makes a provider over an IntelligenceConnection (base URL, default model, retries, timeout) and an IIntelligenceKeySource; cheap, so a host may make one per request |
IIntelligenceKeySource |
where a provider reads its key, once a request: the operating system's credential store on a desktop, the key a job brought on a server, none for a local server |
IIntelligenceProviderPlugin |
the plugin marker (IWitPlugin with a Key); its Initialize registers the vendor's factory |
IntelligenceTransportException |
no answer: NotConfigured, AccessDenied, Rejected, Throttled, Unavailable, Network, Timeout, with the HTTP status when there was one |
IntelligenceEnvelopeException |
an answer whose envelope could not be read |
Why a factory per connection
Email and storage hosts pick one provider by configuration and the provider reads its own key. A model host differs:
a user picks a vendor for each run, and a server may serve many users' keys at once. So every loaded plugin registers
its factory, the host keeps them all and picks one by ProviderKey, and the key reaches the provider only through the
key source, once a request.
var loader = new WitPluginLoader<IIntelligenceProviderPlugin>(Path.Combine(AppContext.BaseDirectory, "@Intelligence"));
// ... each plugin's Initialize(services) registers an IIntelligenceProviderFactory
var factory = services.GetServices<IIntelligenceProviderFactory>().Single(item => item.ProviderKey == "anthropic");
var provider = factory.Create(new IntelligenceConnection { ModelId = "claude-sonnet-5-5" }, new IntelligenceKeySourceFixed(key));
var answer = await provider.SendAsync(new IntelligenceRequest
{
Label = "planning", Instructions = "...", Content = "...", Schema = "{...}", MaximumOutputTokens = 2000
});
Providers
OutWit.Shared.Intelligence.Provider.Anthropic: Claude, through the official Anthropic SDK.OutWit.Shared.Intelligence.Provider.OpenAI: any OpenAI-compatible Chat Completions service: OpenAI, and the servers people run themselves (Ollama, LM Studio, vLLM, llama.cpp).
| 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 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 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.Logging.Abstractions (>= 10.0.10)
- OutWit.Common (>= 1.4.0)
- OutWit.Common.Plugins.Abstractions (>= 1.2.2)
-
net8.0
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.10)
- OutWit.Common (>= 1.4.0)
- OutWit.Common.Plugins.Abstractions (>= 1.2.2)
-
net9.0
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.10)
- OutWit.Common (>= 1.4.0)
- OutWit.Common.Plugins.Abstractions (>= 1.2.2)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on OutWit.Shared.Intelligence.Providers:
| Package | Downloads |
|---|---|
|
OutWit.Shared.Intelligence.Provider.Anthropic
Claude provider for OutWit hosts, through the official Anthropic SDK: structured answers by JSON schema, the least thinking each model family allows within the answer's output limit, retries of throttled and overloaded requests, and failures that carry no vendor text and no key. A plugin (IIntelligenceProviderPlugin) that registers its IIntelligenceProviderFactory under the key "anthropic". |
|
|
OutWit.Shared.Intelligence.Provider.OpenAI
OpenAI-compatible provider for OutWit hosts: any Chat Completions service, OpenAI's own and the servers people run themselves (Ollama, LM Studio, vLLM, llama.cpp). Structured answers by JSON schema, bounded retries of throttled and overloaded requests (Retry-After honoured), an optional key, and failures that carry no vendor text and no key. Plain HTTP, no vendor SDK. A plugin (IIntelligenceProviderPlugin) that registers its IIntelligenceProviderFactory under the key "openai". |
GitHub repositories
This package is not used by any popular GitHub repositories.