Class: LLMMultiSelector
A selector that uses the LLM to select a single or multiple choices from a list of choices.
Extends
Constructors
new LLMMultiSelector()
new LLMMultiSelector(
init
):LLMMultiSelector
Parameters
• init
• init.llm: LLMPredictorType
• init.maxOutputs?: number
• init.outputParser?: BaseOutputParser
<StructuredOutput
<Answer
[]>>
• init.prompt?
Returns
Overrides
Source
packages/llamaindex/src/selectors/llmSelectors.ts:53
Properties
llm
llm:
LLMPredictorType
Source
packages/llamaindex/src/selectors/llmSelectors.ts:48
maxOutputs
maxOutputs:
number
Source
packages/llamaindex/src/selectors/llmSelectors.ts:50
outputParser
outputParser:
BaseOutputParser
<StructuredOutput
<Answer
[]>>
Source
packages/llamaindex/src/selectors/llmSelectors.ts:51
prompt()
prompt: (
numChoices
,contextList
,queryStr
,maxOutputs
) =>string
Parameters
• numChoices: number
• contextList: string
• queryStr: string
• maxOutputs: number
Returns
string
Source
packages/llamaindex/src/selectors/llmSelectors.ts:49
Methods
_getPromptModules()
protected
_getPromptModules():Record
<string
,any
>
Returns
Record
<string
, any
>
Inherited from
BaseSelector
. _getPromptModules
Source
packages/llamaindex/src/prompts/Mixin.ts:82
_getPrompts()
_getPrompts():
Record
<string
, (numChoices
,contextList
,queryStr
,maxOutputs
) =>string
>
Returns
Record
<string
, (numChoices
, contextList
, queryStr
, maxOutputs
) => string
>
Overrides
Source
packages/llamaindex/src/selectors/llmSelectors.ts:67
_select()
_select(
choices
,query
):Promise
<SelectorResult
>
Selects a single choice from a list of choices.
Parameters
• choices: ToolMetadataOnlyDescription
[]
• query: QueryBundle
Returns
Promise
<SelectorResult
>
Overrides
Source
packages/llamaindex/src/selectors/llmSelectors.ts:82
_updatePrompts()
_updatePrompts(
prompts
):void
Parameters
• prompts: Record
<string
, (numChoices
, contextList
, queryStr
, maxOutputs
) => string
>
Returns
void
Overrides
Source
packages/llamaindex/src/selectors/llmSelectors.ts:71
asQueryComponent()
asQueryComponent():
unknown
Returns
unknown
Source
packages/llamaindex/src/selectors/llmSelectors.ts:110