OutWit.Shared.Intelligence.Provider.OpenAI
1.1.0
See the version list below for details.
dotnet add package OutWit.Shared.Intelligence.Provider.OpenAI --version 1.1.0
NuGet\Install-Package OutWit.Shared.Intelligence.Provider.OpenAI -Version 1.1.0
<PackageReference Include="OutWit.Shared.Intelligence.Provider.OpenAI" Version="1.1.0" />
<PackageVersion Include="OutWit.Shared.Intelligence.Provider.OpenAI" Version="1.1.0" />
<PackageReference Include="OutWit.Shared.Intelligence.Provider.OpenAI" />
paket add OutWit.Shared.Intelligence.Provider.OpenAI --version 1.1.0
#r "nuget: OutWit.Shared.Intelligence.Provider.OpenAI, 1.1.0"
#:package OutWit.Shared.Intelligence.Provider.OpenAI@1.1.0
#addin nuget:?package=OutWit.Shared.Intelligence.Provider.OpenAI&version=1.1.0
#tool nuget:?package=OutWit.Shared.Intelligence.Provider.OpenAI&version=1.1.0
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_tokensto OpenAI's own service (its newer models refusemax_tokens) and asmax_tokensto every other server. - Thinking, temperature and seed (1.1.0): a request's
Reasoninggoes asreasoning_effort(none,low,medium,high; nothing forDefault), which Ollama and LM Studio honour too (noneturns a model's thinking off; Ollama ignores its ownthinkfield on this endpoint);TemperatureandSeedgo astemperatureandseedwhen set. A model that thinks to the output limit stops withOutputLimitand no answer: the same request withReasoning = Noneis the usual way on. - Retries of 408, 409, 429, 5xx and dropped connections, as many as the connection allows, waiting what the
service's
Retry-Afterasks (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 | 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.DependencyInjection.Abstractions (>= 10.0.10)
- OutWit.Shared.Intelligence.Providers (>= 1.1.0)
-
net8.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.10)
- OutWit.Shared.Intelligence.Providers (>= 1.1.0)
-
net9.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.10)
- OutWit.Shared.Intelligence.Providers (>= 1.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.