Class: LLMMultiSelector
A selector that uses the LLM to select a single or multiple choices from a list of choices.
Hierarchy
-
↳
LLMMultiSelector
Constructors
constructor
• new LLMMultiSelector(init
): LLMMultiSelector
Parameters
Name | Type |
---|---|
init | Object |
init.llm | LLM |
init.maxOutputs? | number |
init.outputParser? | BaseOutputParser <StructuredOutput <Answer []>> |
init.prompt? | (numChoices : number , contextList : string , queryStr : string , maxOutputs : number ) => string |
Returns
Overrides
Defined in
packages/core/src/selectors/llmSelectors.ts:53
Properties
llm
• llm: LLM
Defined in
packages/core/src/selectors/llmSelectors.ts:48
maxOutputs
• maxOutputs: number
Defined in
packages/core/src/selectors/llmSelectors.ts:50
outputParser
• outputParser: null
| BaseOutputParser
<StructuredOutput
<Answer
[]>>
Defined in
packages/core/src/selectors/llmSelectors.ts:51
prompt
• prompt: (numChoices
: number
, contextList
: string
, queryStr
: string
, maxOutputs
: number
) => string
Type declaration
▸ (numChoices
, contextList
, queryStr
, maxOutputs
): string
Parameters
Name | Type |
---|---|
numChoices | number |
contextList | string |
queryStr | string |
maxOutputs | number |
Returns
string
Defined in
packages/core/src/selectors/llmSelectors.ts:49
Methods
_getPromptModules
▸ _getPromptModules(): Record
<string
, any
>
Returns
Record
<string
, any
>
Inherited from
BaseSelector._getPromptModules
Defined in
packages/core/src/prompts/Mixin.ts:82
_getPrompts
▸ _getPrompts(): Record
<string
, (numChoices
: number
, contextList
: string
, queryStr
: string
, maxOutputs
: number
) => string
>
Returns
Record
<string
, (numChoices
: number
, contextList
: string
, queryStr
: string
, maxOutputs
: number
) => string
>
Overrides
Defined in
packages/core/src/selectors/llmSelectors.ts:67
_select
▸ _select(choices
, query
): Promise
<SelectorResult
>
Selects a single choice from a list of choices.
Parameters
Name | Type |
---|---|
choices | ToolMetadataOnlyDescription [] |
query | QueryBundle |
Returns
Promise
<SelectorResult
>
Overrides
Defined in
packages/core/src/selectors/llmSelectors.ts:82
_updatePrompts
▸ _updatePrompts(prompts
): void
Parameters
Name | Type |
---|---|
prompts | Record <string , (numChoices : number , contextList : string , queryStr : string , maxOutputs : number ) => string > |
Returns
void
Overrides
Defined in
packages/core/src/selectors/llmSelectors.ts:71