BasePromptSelector#

class langchain.chains.prompt_selector.BasePromptSelector[source]#

Bases: BaseModel, ABC

Base class for prompt selectors.

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

abstract get_prompt(llm: BaseLanguageModel) BasePromptTemplate[source]#

Get default prompt for a language model.

Parameters:

llm (BaseLanguageModel) –

Return type:

BasePromptTemplate