langchain.js
    Preparing search index...

    Interface FewShotChatMessagePromptTemplateInput

    Input common to all prompt templates.

    interface FewShotChatMessagePromptTemplateInput {
        examplePrompt:
            | BaseMessagePromptTemplate<
                any,
                BaseMessage<MessageStructure, MessageType>[],
            >
            | BaseChatPromptTemplate<any, any>;
        examples?: Example[];
        exampleSelector?: BaseExampleSelector;
        exampleSeparator?: string;
        inputVariables: string[];
        outputParser?: BaseOutputParser<unknown>;
        partialVariables?: PartialValues<any>;
        prefix?: string;
        suffix?: string;
        templateFormat?: TemplateFormat;
        validateTemplate?: boolean;
    }

    Hierarchy (View Summary)

    Implemented by

    Index

    Properties

    examplePrompt:
        | BaseMessagePromptTemplate<
            any,
            BaseMessage<MessageStructure, MessageType>[],
        >
        | BaseChatPromptTemplate<any, any>

    An BaseMessagePromptTemplate | BaseChatPromptTemplate used to format a single example.

    examples?: Example[]

    Examples to format into the prompt. Exactly one of this or exampleSelector must be provided.

    exampleSelector?: BaseExampleSelector

    An BaseExampleSelector Examples to format into the prompt. Exactly one of this or examples must be provided.

    exampleSeparator?: string

    String separator used to join the prefix, the examples, and suffix.

    "\n\n"

    inputVariables: 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

    partialVariables?: PartialValues<any>

    Partial variables

    prefix?: string

    A prompt template string to put before the examples.

    ""

    suffix?: string

    A prompt template string to put after the examples.

    ""

    templateFormat?: TemplateFormat

    The format of the prompt template. Options are: 'f-string'

    f-string

    validateTemplate?: boolean

    Whether or not to try validating the template on initialization.

    true