Class CustomFormatPromptTemplate<RunInput, PartialVariableName>

Type Parameters

  • RunInput extends Toolkit = any
  • PartialVariableName extends string = any

Hierarchy (view full)

Constructors

Properties

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.