SimpleGPT.Core 1.3.1

dotnet add package SimpleGPT.Core --version 1.3.1
                    
NuGet\Install-Package SimpleGPT.Core -Version 1.3.1
                    
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="SimpleGPT.Core" Version="1.3.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SimpleGPT.Core" Version="1.3.1" />
                    
Directory.Packages.props
<PackageReference Include="SimpleGPT.Core" />
                    
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 SimpleGPT.Core --version 1.3.1
                    
#r "nuget: SimpleGPT.Core, 1.3.1"
                    
#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 SimpleGPT.Core@1.3.1
                    
#: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=SimpleGPT.Core&version=1.3.1
                    
Install as a Cake Addin
#tool nuget:?package=SimpleGPT.Core&version=1.3.1
                    
Install as a Cake Tool

SimpleGPT.Core

Simplistic library for adding ChatGPT in your application for problem solving and context evaluation/recommendation. Uses OpenAI's GPT APIs

Basic Clients

There are two basic clients for the Chat and Completions OpenAI APIs respectively

The ChatGptClient and the GptCompletionsClient

using SimpleGPT.Core;

const string GPT_API_KEY = "< api-key-here >";
var chatGpt = new ChatGptClient(Shared.ModelNames.Gpt4Turbo, GPT_API_KEY);

chatGpt.AddChatMessage(ChatMessageType.System, "You're a system that help users to get their answers/ideas");
chatGpt.AddChatMessage(ChatMessageType.User, "Give me ideas for a new software");

var result = await chatGpt.CallGpt();

Evaluator Client

This client has a built-in "framework" of a problem solving using ChatGPT APIs. It helps you to specify the problem, the state/context and then make questions on top of that.

using SimpleGPT.Core;

const string GPT_API_KEY = "<api-key-here>";
var gptClient = new GptClientFactory().Create(GPT_API_KEY);

var knowledgeBase = "<the specific knowledge base for your problem>";
var context = "<current context or state of the scenario you want to make question onto>";
var question = "<the question based on konwledge/context>";

var evaluator = new GptEvaluator(gptClient, knowledgeBase, context);
var result = await evaluator.Evaluate(question);

Decisions API

GptDecisionMaker evaluates text using OpenAI's Decisions API. It uses the gpt-6-luna model and sends requests directly to /v1/decisions: the official OpenAI .NET client 2.14.0 does not expose a Decisions client. The library remains compatible with .NET 6. Image inputs are not supported.

Supply a reusable HttpClient, an API key from a secure source, shared knowledge and context, and a named question. The caller owns the HttpClient. An optional constructor overload accepts custom preset instructions before the knowledge and context arguments. Each Evaluate call sends one question.

using SimpleGPT.Core;

var apiKey = "<api-key-here>";
using var httpClient = new HttpClient();
var maker = new GptDecisionMaker(httpClient, apiKey,
    "Returns are handled by billing; delivery issues are handled by shipping.",
    "The customer says their order arrived damaged."
);

var choice = await maker.Evaluate(new ChoiceQuestion("department", "Which department should handle this?", new[]
{
    new DecisionChoice("billing", "Returns and refunds"),
    new DecisionChoice("shipping", "Delivery issues")
}));

if (!choice.IsRefused)
{
    Console.WriteLine($"Department: {choice.Answer!.Choice.Value}; confidence: {choice.Answer.Confidence}");
}

Note that:

  • Predicate answers provide a probability from 0 to 1.
  • Choice answers provide the selected string or Boolean value, confidence, and a probability for each choice.
  • Score answers provide confidence and per-level probabilities; the score is the probability-weighted average of the zero-based level indices and can fall between levels.

Use application-specific thresholds when interpreting results. A refusal has no answer and is available through Refusal.

Sample

Sample

Product 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. 
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.3.1 115 11/3/2026
1.3.0 91 11/3/2026
1.2.0 203 7/23/2026
1.1.0 245 3/5/2024
1.0.2 179 2/28/2024
1.0.0 291 2/27/2024