OutWit.Shared.Intelligence.Provider.OpenAI 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package OutWit.Shared.Intelligence.Provider.OpenAI --version 1.0.0
                    
NuGet\Install-Package OutWit.Shared.Intelligence.Provider.OpenAI -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="OutWit.Shared.Intelligence.Provider.OpenAI" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OutWit.Shared.Intelligence.Provider.OpenAI" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="OutWit.Shared.Intelligence.Provider.OpenAI" />
                    
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 OutWit.Shared.Intelligence.Provider.OpenAI --version 1.0.0
                    
#r "nuget: OutWit.Shared.Intelligence.Provider.OpenAI, 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 OutWit.Shared.Intelligence.Provider.OpenAI@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=OutWit.Shared.Intelligence.Provider.OpenAI&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=OutWit.Shared.Intelligence.Provider.OpenAI&version=1.0.0
                    
Install as a Cake Tool

OutWit.Shared.Intelligence.Provider.OpenAI

Any OpenAI-compatible Chat Completions service for OutWit hosts, behind the vendor-neutral contract of OutWit.Shared.Intelligence.Providers: OpenAI's own service, and the servers people run on their own machines. Plain HTTP, no vendor SDK.

Service Base URL Key
OpenAI default (https://api.openai.com/v1) required
Ollama http://host:11434/v1 none
LM Studio http://host:1234/v1 none
vLLM, llama.cpp server http://host:port/v1 as the server is set up
  • Structured answers: a request's JSON schema becomes response_format: json_schema.
  • The output limit goes as max_completion_tokens to OpenAI's own service (its newer models refuse max_tokens) and as max_tokens to every other server.
  • Retries of 408, 409, 429, 5xx and dropped connections, as many as the connection allows, waiting what the service's Retry-After asks (at most 30 s) or 0.5 s doubling to 8 s. A refused request (other 4xx) and a timeout are not retried.
  • Nothing leaks: a failure carries a category and the HTTP status, never the service's body; logs carry metrics (model, status, duration, tokens, a known finish reason), never content or the key. An answer envelope above 16 MB is not read.

Use

var factory = new IntelligenceProviderFactoryOpenAI();        // or load IntelligenceProviderPluginOpenAI
var provider = factory.Create(
    new IntelligenceConnection { BaseUrl = "http://lab-machine:11434/v1", ModelId = "gemma3:27b" },
    IntelligenceKeySourceFixed.NONE);
var answer = await provider.SendAsync(new IntelligenceRequest { Content = "...", Schema = "{...}", MaximumOutputTokens = 8000 });

The plugin registers its factory under the key openai; it reads no settings and no key at registration. A local server's context length is its own setting (Ollama: OLLAMA_CONTEXT_LENGTH; LM Studio: when the model is loaded): a prompt longer than it is cut by the server, not refused.

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 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. 
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.1.1 0 11/29/2026
1.1.0 77 11/26/2026
1.0.0 70 11/23/2026