Class: LLMSingleSelector
A selector that uses the LLM to select a single choice from a list of choices.
Extends
Constructors
new LLMSingleSelector()
new LLMSingleSelector(
init
):LLMSingleSelector
Parameters
• init
• init.llm: LLM
<object
, object
>
• init.outputParser?: BaseOutputParser
<StructuredOutput
<Answer
[]>>
• init.prompt?
Returns
Overrides
Defined in
packages/llamaindex/src/selectors/llmSelectors.ts:122
Properties
llm
llm:
LLM
<object
,object
>
Defined in
packages/llamaindex/src/selectors/llmSelectors.ts:118
outputParser
outputParser:
BaseOutputParser
<StructuredOutput
<Answer
[]>>
Defined in
packages/llamaindex/src/selectors/llmSelectors.ts:120
prompt()
prompt: (
numChoices
,contextList
,queryStr
) =>string
Parameters
• numChoices: number
• contextList: string
• queryStr: string
Returns
string
Defined in
packages/llamaindex/src/selectors/llmSelectors.ts:119
Methods
_getPromptModules()
protected
_getPromptModules():Record
<string
,any
>
Returns
Record
<string
, any
>
Inherited from
BaseSelector
._getPromptModules
Defined in
packages/llamaindex/src/prompts/Mixin.ts:83