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: LLM
<object
, object
>
• init.maxOutputs?: number
• init.outputParser?: BaseOutputParser
<StructuredOutput
<Answer
[]>>
• init.prompt?: MultiSelectPrompt
Returns
Overrides
Defined in
packages/llamaindex/src/selectors/llmSelectors.ts:53
Properties
llm
llm:
LLM
<object
,object
>
Defined in
packages/llamaindex/src/selectors/llmSelectors.ts:48
maxOutputs
maxOutputs:
number
Defined in
packages/llamaindex/src/selectors/llmSelectors.ts:50
outputParser
outputParser:
BaseOutputParser
<StructuredOutput
<Answer
[]>>
Defined in
packages/llamaindex/src/selectors/llmSelectors.ts:51
prompt
prompt:
MultiSelectPrompt
Defined in
packages/llamaindex/src/selectors/llmSelectors.ts:49
Methods
_getPromptModules()
protected
_getPromptModules():ModuleRecord
Return a dictionary of sub-modules within the current module that also implement PromptMixin (so that their prompts can also be get/set).
Can be blank if no sub-modules.
Returns
Overrides
BaseSelector
._getPromptModules
Defined in
packages/llamaindex/src/selectors/llmSelectors.ts:77
_getPrompts()
_getPrompts():
object
Returns
object
prompt
prompt:
MultiSelectPrompt
Overrides
Defined in
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
Defined in
packages/llamaindex/src/selectors/llmSelectors.ts:86
_updatePrompts()
_updatePrompts(
prompts
):void
Parameters
• prompts
• prompts.prompt: MultiSelectPrompt
Returns
void
Overrides
Defined in
packages/llamaindex/src/selectors/llmSelectors.ts:71
asQueryComponent()
asQueryComponent():
unknown
Returns
unknown
Defined in
packages/llamaindex/src/selectors/llmSelectors.ts:114
getPrompts()
getPrompts():
PromptsRecord
Returns
Inherited from
Defined in
packages/core/prompts/dist/prompts/index.d.ts:58
select()
select(
choices
,query
):Promise
<SelectorResult
>
Parameters
• choices: MetadataType
[]
• query: QueryType
Returns
Promise
<SelectorResult
>
Inherited from
Defined in
packages/llamaindex/src/selectors/base.ts:27
updatePrompts()
updatePrompts(
prompts
):void
Parameters
• prompts: PromptsRecord
Returns
void
Inherited from
Defined in
packages/core/prompts/dist/prompts/index.d.ts:59
validatePrompts()
validatePrompts(
promptsDict
,moduleDict
):void
Parameters
• promptsDict: PromptsRecord
• moduleDict: ModuleRecord
Returns
void
Inherited from
Defined in
packages/core/prompts/dist/prompts/index.d.ts:57