Interface PromptTemplateInput<RunInput, PartialVariableName, Format>

Inputs to create a PromptTemplate

interface PromptTemplateInput<RunInput, PartialVariableName, Format> {
    inputVariables: Extract<keyof RunInput, string>[];
    template: MessageContent;
    outputParser?: BaseOutputParser<unknown>;
    partialVariables?: PartialValues<PartialVariableName>;
    templateFormat?: Format;
    validateTemplate?: boolean;

Type Parameters

Hierarchy (view full)

Implemented by


inputVariables: Extract<keyof RunInput, string>[]

A list of variable names the prompt template expects

template: MessageContent

The prompt template

outputParser?: BaseOutputParser<unknown>

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

Partial variables

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

Default Value


Generated using TypeDoc