PromptifyNET 1.0.0

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

PromptifyNET

A lightweight, config-first prompt chaining library for .NET that makes LLM-powered application development simple, fast, and flexible.

Features

  • Config-first prompt chaining and orchestration
  • Multiple LLM provider support (OpenAI, Anthropic, OpenRouter, and more)
  • Built-in prompt templates and chaining logic
  • Extensible plugin system for custom steps
  • Minimal code required for setup and usage
  • Async/await and DI-friendly
  • Logging and diagnostics support
  • High performance and thread safety

Installation

dotnet add package PromptifyNET

Quick Start

using PromptifyNET;

// Create the engine
var engine = new PromptChainEngine()
    .RegisterProvider(new DummyLlmProvider());

// Configure your prompt chain
var config = new PromptChainConfig
{
    Steps = new List<PromptStep>
    {
        new PromptStep
        {
            Name = "greeting",
            PromptTemplate = "Hello, {{name}}!",
            Provider = "Dummy"
        }
    }
};

// Run the chain
var context = new Dictionary<string, object>
{
    ["name"] = "World"
};

var result = await engine.RunAsync(config, context);
Console.WriteLine(result); // Output: [LLM Response to: Hello, World!]

Advanced Usage

Multi-step Chains

var config = new PromptChainConfig
{
    Steps = new List<PromptStep>
    {
        new PromptStep
        {
            Name = "generate",
            PromptTemplate = "Generate a number: {{input}}",
            Provider = "Dummy"
        },
        new PromptStep
        {
            Name = "double",
            PromptTemplate = "Double the number: {{last}}",
            Provider = "Dummy"
        }
    }
};

Using Plugins

var engine = new PromptChainEngine()
    .RegisterProvider(new DummyLlmProvider())
    .RegisterPlugin(new UppercasePlugin());

var config = new PromptChainConfig
{
    Steps = new List<PromptStep>
    {
        new PromptStep
        {
            Name = "greeting",
            PromptTemplate = "Hello, {{name}}!",
            Provider = "Dummy",
            Plugins = new List<string> { "Uppercase" }
        }
    }
};

Available Providers

  • DummyLlmProvider: For testing and development
  • OpenAiProvider: OpenAI API integration
  • AnthropicProvider: Anthropic Claude API integration
  • OpenRouterProvider: OpenRouter API integration

Available Plugins

  • UppercasePlugin: Converts text to uppercase
  • LowercasePlugin: Converts text to lowercase
  • SummarizePlugin: Creates text summaries
  • TranslatePlugin: Translation placeholder
  • SentimentPlugin: Basic sentiment analysis
  • FormatPlugin: Formats text (Markdown, HTML, JSON)
  • FilterPlugin: Filters text by length

Creating Custom Providers

public class CustomProvider : ILlmProvider
{
    public string Name => "Custom";
    
    public async Task<string> InvokeAsync(string prompt, IDictionary<string, object>? context = null)
    {
        // Your custom LLM integration logic here
        return $"Custom response to: {prompt}";
    }
}

Creating Custom Plugins

public class CustomPlugin : IPromptPlugin
{
    public string Name => "Custom";
    
    public async Task<string> ExecuteAsync(string input, IDictionary<string, object>? context = null)
    {
        // Your custom processing logic here
        return $"Processed: {input}";
    }
}

Configuration

PromptifyNET supports various configuration options through the context parameter:

var context = new Dictionary<string, object>
{
    ["targetLanguage"] = "Spanish",
    ["format"] = "markdown",
    ["maxLength"] = 500
};

Contributing

We welcome contributions! Please feel free to submit issues and pull requests.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Product Compatible and additional computed target framework versions.
.NET 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 was computed.  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.
  • net9.0

    • No dependencies.

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.0.0 436 7/24/2025