Class ConditionalPromptSelector

Concrete implementation of BasePromptSelector that selects a prompt based on a set of conditions. It has a default prompt that it returns if none of the conditions are met.

Hierarchy

Constructors

Properties

conditionals: [condition: ((llm) => boolean), prompt: BasePromptTemplate<any, BasePromptValueInterface, any>][]
defaultPrompt: BasePromptTemplate<any, BasePromptValueInterface, any>

Methods

  • Asynchronous version of getPrompt that also accepts an options object for partial variables.

    Parameters

    Returns Promise<BasePromptTemplate<any, BasePromptValueInterface, any>>

    A Promise that resolves to a prompt template.

Generated using TypeDoc