langchain.js
    Preparing search index...

    Type Parameters

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    lc_serializable: boolean = false
    renderer: (template: string, values: InputValues) => string
    templateValidator?: (template: string, inputVariables: string[]) => boolean

    Methods

    • Formats the prompt template with the provided values.

      Parameters

      • values: TypedPromptInputValues<RunInput>

        The values to be used to format the prompt template.

      Returns Promise<string>

      A promise that resolves to a string which is the formatted prompt.

    • Load prompt template from a template

      Type Parameters

      • RunInput extends InputValues = Record<string, any>

      Parameters

      • template: string
      • Optionalparams: Omit<
            HandlebarsPromptTemplateInput<RunInput>,

                | "template"
                | "inputVariables"
                | "customParser"
                | "templateValidator"
                | "renderer",
        >

      Returns CustomFormatPromptTemplate<RunInput extends Symbol ? never : RunInput, any>

    • Returns string