langchain.js
    Preparing search index...

    Interface PromptTemplateInput<RunInput, PartialVariableName, Format>

    Inputs to create a PromptTemplate

    interface PromptTemplateInput<
        RunInput extends InputValues = any,
        PartialVariableName extends string = any,
        Format extends TemplateFormat = TemplateFormat,
    > {
        additionalContentFields?: ContentBlock;
        inputVariables: Extract<keyof RunInput, string>[];
        outputParser?: BaseOutputParser<unknown>;
        partialVariables?: PartialValues<PartialVariableName>;
        template: MessageContent;
        templateFormat?: Format;
        validateTemplate?: boolean;
    }

    Type Parameters

    Hierarchy (View Summary)

    Implemented by

    Index

    Properties

    additionalContentFields?: ContentBlock

    Additional fields which should be included inside the message content array if using a complex message content.

    inputVariables: Extract<keyof RunInput, string>[]

    A list of variable names the prompt template expects

    outputParser?: BaseOutputParser<unknown>

    How to parse the output of calling an LLM on this formatted prompt

    Partial variables

    template: MessageContent

    The prompt template

    templateFormat?: Format

    The format of the prompt template. Options are "f-string" and "mustache"

    validateTemplate?: boolean

    Whether or not to try validating the template on initialization

    true