Interface ChatPromptTemplateInput<RunInput, PartialVariableName>

Interface for the input of a ChatPromptTemplate.

interface ChatPromptTemplateInput<RunInput, PartialVariableName> {
    inputVariables: Extract<keyof RunInput, string>[];
    promptMessages: (BaseMessage | BaseMessagePromptTemplate<any, BaseMessage[]>)[];
    outputParser?: BaseOutputParser<unknown>;
    partialVariables?: PartialValues<PartialVariableName>;
    templateFormat?: "f-string" | "mustache";
    validateTemplate?: boolean;
}

Type Parameters

  • RunInput extends InputValues = any

  • PartialVariableName extends string = any

Hierarchy (view full)

Implemented by

Properties

inputVariables: Extract<keyof RunInput, string>[]

A list of variable names the prompt template expects

promptMessages: (BaseMessage | BaseMessagePromptTemplate<any, BaseMessage[]>)[]

The prompt messages

outputParser?: BaseOutputParser<unknown>

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

Partial variables

templateFormat?: "f-string" | "mustache"

The formatting method to use on the prompt.

Default

"f-string"
validateTemplate?: boolean

Whether to try validating the template on initialization

Default Value

true

Generated using TypeDoc