DotnetPrompt.LLM.OpenAI 1.0.0-alpha.2.1

This is a prerelease version of DotnetPrompt.LLM.OpenAI.
dotnet add package DotnetPrompt.LLM.OpenAI --version 1.0.0-alpha.2.1
NuGet\Install-Package DotnetPrompt.LLM.OpenAI -Version 1.0.0-alpha.2.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="DotnetPrompt.LLM.OpenAI" Version="1.0.0-alpha.2.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DotnetPrompt.LLM.OpenAI --version 1.0.0-alpha.2.1
#r "nuget: DotnetPrompt.LLM.OpenAI, 1.0.0-alpha.2.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.
// Install DotnetPrompt.LLM.OpenAI as a Cake Addin
#addin nuget:?package=DotnetPrompt.LLM.OpenAI&version=1.0.0-alpha.2.1&prerelease

// Install DotnetPrompt.LLM.OpenAI as a Cake Tool
#tool nuget:?package=DotnetPrompt.LLM.OpenAI&version=1.0.0-alpha.2.1&prerelease

Quick Start

DotnetPrompt is a dotnet library that provides tools for working with Large Language Models (LLMs) individually and combined in chains. Our library helps you integrate LLMs with other tools and resources to create powerful AI applications.

To get started, add NuGet meta-package

> dotnet add package DotnetPrompt.All --version 1.0.0-alpha.1

For example, let's say we want to create a ModelChain that takes user message, formats it with a PromptTemplate, and sends it to an ChatGPT LLM to generate funny responses to the message. This allows us to generate a response based on the user's input.

Note: For that example to work you would need OpenAI API key.

var llm = new ChatGptModel(Constants.OpenAIKey, ChatGptModelConfiguration.Default with
        {
            Temperature = 0.9f
        });

var oneInputPrompt = new PromptTemplate("What's a funny response to '{message}'");

var chain = new ModelChain(oneInputPrompt, llm);
var executor = chain.GetExecutor();

Now we can run that chain only specifying input value.

var result = await executor.PromptAsync("I have some exciting news to share with you!");
Console.WriteLine(result);
> I hope it's not that you finally learned how to tie your shoes, because that's not that exciting.

Or with another input

var result2 = await executor.PromptAsync("Want to grab lunch later?");
Console.WriteLine(result2);
> I would, but I'm on a "seefood" diet - I see food and I eat it. So better not tempt me!

What is this?

Welcome to our library, which is designed to support the development of cutting-edge applications powered by Large Language Models (LLMs) in dotnet.

As you may know, LLMs are an exciting and rapidly-evolving technology that offers developers unprecedented natural language processing and generation capabilities. However, LLMs can achieve their full potential when used in conjunction with other sources of computation or knowledge.

Some examples of solutions that you could create using our library include:

  • Summarization
  • Question Answering
  • Code Generation
  • Chatbots
  • and much more

Documentation

Please see the full documentation on:

  • Getting started (installation, setting up the environment, simple examples)
  • How-To examples (demos, integrations, helper functions)
  • Reference (full API docs)
  • Resources (high-level explanation of core concepts)
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on DotnetPrompt.LLM.OpenAI:

Package Downloads
DotnetPrompt.All

DotnetPrompt is a dotnet library that provides a set of tools for working with Large Language Models (LLMs) combined in chains.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0-alpha.2.1 124 3/18/2023
1.0.0-alpha.2 105 3/18/2023
1.0.0-alpha.1 108 3/3/2023