Class CustomFormatPromptTemplate<RunInput, PartialVariableName>

Type Parameters

  • RunInput extends Toolkit = any

  • PartialVariableName extends string = any

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

renderer: ((template, values) => string)

Type declaration

    • (template, values): string
    • Parameters

      • template: string
      • values: InputValues

      Returns string

templateValidator?: ((template, inputVariables) => boolean)

Type declaration

    • (template, inputVariables): boolean
    • Parameters

      • template: string
      • inputVariables: string[]

      Returns 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.

Generated using TypeDoc