Interface PromptTemplateInput<RunInput, PartialVariableName, Format>

Inputs to create a PromptTemplate

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

Type Parameters

Hierarchy (view full)

Implemented by

Properties

additionalContentFields?: MessageContentComplex

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