PromptClient 0.1.4

There is a newer version of this package available.
See the version list below for details.
dotnet add package PromptClient --version 0.1.4                
NuGet\Install-Package PromptClient -Version 0.1.4                
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="PromptClient" Version="0.1.4" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PromptClient --version 0.1.4                
#r "nuget: PromptClient, 0.1.4"                
#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.
// Install PromptClient as a Cake Addin
#addin nuget:?package=PromptClient&version=0.1.4

// Install PromptClient as a Cake Tool
#tool nuget:?package=PromptClient&version=0.1.4                

PromptClient

A .Net Core library for communicating with AI API services such as the OpenAI API.

Note from author: Currently the released version, 0.1.x, has an API interface that likely will change. I have noticed that a few people downloaded it immediately. If you are reading this and it is v0.1.x version still, then expect the interface to change. I want to make a more generic interface so I can support more than one service and a simpler interface than the response and request formats currently. Before 1.0, I expect to make drastic changes to the API surface to make it a better experience. If for someone reason you immediately downloaded and started using this API, for one...you are crazy...it had 0 downloads....that's not safe...but if you do happen to be human, I oppologize in advance for immediately changing the interface of the API after release.

Usage

    var apiKey = "YOUR_API_KEY_HERE";
    var creds = new AICredentials(apiKey);
    using var client = new OpenAIClient(httpClient, creds);
    var response = await client.SendPromptAsync(
        new List<AIMessage> {
            new AIMessage {
                Content = "My LLM Prompt"
            }
        }
    );
    if (response.IsError) 
    {
        var error = response.UnwrapError();
        //Do something with error        
        return;
    }
    var apiResponse = response.Unwrap();
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible. 
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
0.3.2 71 12/9/2024
0.3.1 74 12/8/2024
0.3.0 77 12/8/2024
0.2.0 76 12/7/2024
0.1.4 72 12/7/2024
0.1.3 71 12/7/2024
0.1.2 63 12/7/2024
0.1.1 87 12/7/2024
0.1.0 78 12/7/2024