Optional
conditionals: [condition: ((llm) => boolean), prompt: BasePromptTemplate<any, BasePromptValue, any>][]Method that selects a prompt based on a set of conditions. If none of the conditions are met, it returns the default prompt.
The language model for which to get a prompt.
A prompt template.
Asynchronous version of getPrompt
that also accepts an options object
for partial variables.
The language model for which to get a prompt.
Optional
options: BaseGetPromptAsyncOptionsOptional object for partial variables.
A Promise that resolves to a prompt template.
Generated using TypeDoc
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.