Tharga.Team.Support.OpenAI
4.6.2
dotnet add package Tharga.Team.Support.OpenAI --version 4.6.2
NuGet\Install-Package Tharga.Team.Support.OpenAI -Version 4.6.2
<PackageReference Include="Tharga.Team.Support.OpenAI" Version="4.6.2" />
<PackageVersion Include="Tharga.Team.Support.OpenAI" Version="4.6.2" />
<PackageReference Include="Tharga.Team.Support.OpenAI" />
paket add Tharga.Team.Support.OpenAI --version 4.6.2
#r "nuget: Tharga.Team.Support.OpenAI, 4.6.2"
#:package Tharga.Team.Support.OpenAI@4.6.2
#addin nuget:?package=Tharga.Team.Support.OpenAI&version=4.6.2
#tool nuget:?package=Tharga.Team.Support.OpenAI&version=4.6.2
Tharga.Team.Support.OpenAI
Lets each team's support assistant answer through the team's own OpenAI key, or through an Ollama or llama.cpp server of the team's own, with the model chosen from what that provider offers.
All three speak the OpenAI-compatible API, so this package reaches them with the official OpenAI SDK through
Microsoft.Extensions.AI.OpenAI. It is a package of its own so that a host which never lets teams bring their own AI
does not acquire a vendor SDK.
Use
builder.Services.AddThargaSupportCases();
builder.Services.AddThargaSupportAiConnections(); // each team chooses: the platform's model, its own provider, or off
builder.Services.AddThargaSupportOpenAIProviders(); // adds OpenAI, Ollama and llama.cpp as providers a team can choose
builder.Services.AddThargaSupportAiProviders(); // optional, from Tharga.Team.Support.Anthropic: Neurolito and Anthropic
// Keys are stored encrypted with Data Protection. Keep the key ring where every instance reads it:
builder.Services.AddDataProtection()
.SetApplicationName("MySite")
.PersistKeysToThargaMongo();
Then put <SupportAssistantConnectionView /> on a page for team administrators, or map the endpoints with
app.MapThargaSupportAiConnection(). Both need the assistant:manage team scope, which administrators hold by default.
What a team gets
- OpenAI starts from
https://api.openai.com/v1and needs the team's key. - Ollama and llama.cpp start from no address: the team gives its server's, including the version path
(
https://ollama.example.com/v1,https://llama.example.com/v1). The key is optional and sent only if given. - Load models lists what the provider offers, from
GET {address}/models. OpenAI lists every model the key may use, including some that do not chat; Test sends the chosen model one short message and shows the reply. - Save checks once more that the provider offers the model, then stores the key, if any, encrypted. It is never shown again; it can be replaced.
An address must be https, or http on the same machine as the site. A server elsewhere on the network needs https in front of it, such as a reverse proxy.
Options
builder.Services.AddThargaSupportOpenAIProviders(o =>
{
o.OfferOpenAI = true; // false leaves OpenAI out
o.OpenAIBaseAddress = "https://api.openai.com/v1"; // where an OpenAI connection starts; a team can change it
o.OfferOllama = true; // false leaves Ollama out
o.OllamaBaseAddress = null; // set it where every team shares one server you run
o.OfferLlamaCpp = true; // false leaves llama.cpp out
o.LlamaCppBaseAddress = null;
o.MaxOutputTokens = 4096; // the ceiling for one answer
});
Full documentation: Support cases.
Links
| Product | Versions 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. |
-
net10.0
- Microsoft.Extensions.AI.OpenAI (>= 10.11.0)
- Microsoft.Extensions.Http (>= 10.0.14)
- OpenAI (>= 2.14.0)
- Tharga.Team.Support (>= 4.6.2)
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 |
|---|---|---|
| 4.6.2 | 50 | 10/29/2026 |