Search Results for

    Show / Hide Table of Contents

    Interface IPromptTemplate

    Schema to represent a prompt for an LLM.

    Namespace: DotnetPrompt.Abstractions.Prompts
    Assembly: DotnetPrompt.Abstractions.dll
    Syntax
    public interface IPromptTemplate

    Properties

    | Improve this Doc View Source

    InputVariables

    A list of the names of the variables the prompt template expects.

    Declaration
    IList<string> InputVariables { get; }
    Property Value
    Type Description
    IList<string>

    Methods

    | Improve this Doc View Source

    Format(IDictionary<string, string>)

    Build a prompt from current template and a list of values.

    Declaration
    string Format(IDictionary<string, string> values = null)
    Parameters
    Type Name Description
    IDictionary<string, string> values

    Key-Value list of values to use to build prompt.

    Returns
    Type Description
    string

    String prompt

    Exceptions
    Type Condition
    System.ArgumentException

    Throws when provided list of keys does not match InputVariables.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright 2023 © Pavel «xakpc» Osadchuk for DotnetPrompt