langchain.js
    Preparing search index...

    Interface StructuredPromptInput<RunInput, PartialVariableName>

    Interface for the input of a ChatPromptTemplate.

    interface StructuredPromptInput<
        RunInput extends InputValues = any,
        PartialVariableName extends string = any,
    > {
        inputVariables: Extract<keyof RunInput, string>[];
        method?: "jsonMode" | "jsonSchema" | "functionMode";
        outputParser?: BaseOutputParser<unknown>;
        partialVariables?: PartialValues<PartialVariableName>;
        promptMessages: (
            | BaseMessage<MessageStructure, MessageType>
            | BaseMessagePromptTemplate<
                any,
                BaseMessage<MessageStructure, MessageType>[],
            >
        )[];
        schema: Record<string, any>;
        templateFormat?: TemplateFormat;
        validateTemplate?: boolean;
    }

    Type Parameters

    • RunInput extends InputValues = any
    • PartialVariableName extends string = any

    Hierarchy (View Summary)

    Implemented by

    Index

    Properties

    inputVariables: Extract<keyof RunInput, string>[]

    A list of variable names the prompt template expects

    method?: "jsonMode" | "jsonSchema" | "functionMode"
    outputParser?: BaseOutputParser<unknown>

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

    Partial variables

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

    The prompt messages

    schema: Record<string, any>
    templateFormat?: TemplateFormat

    The formatting method to use on the prompt.

    "f-string"
    
    validateTemplate?: boolean

    Whether to try validating the template on initialization

    true