Class LengthBasedExampleSelector

A specialized example selector that selects examples based on their length, ensuring that the total length of the selected examples does not exceed a specified maximum length.

Hierarchy

Constructors

Properties

examplePrompt: PromptTemplate<any, any>
exampleTextLengths: number[] = []
getTextLength: ((text) => number) = getLengthBased

Type declaration

    • (text): number
    • Parameters

      • text: string

      Returns number

maxLength: number = 2048
examples: Example[] = []

Methods

Generated using TypeDoc