Class: LLMQuestionGenerator
LLMQuestionGenerator uses the LLM to generate new questions for the LLM using tools and a user query.
Extends
Implements
BaseQuestionGenerator
Constructors
new LLMQuestionGenerator()
new LLMQuestionGenerator(
init
?):LLMQuestionGenerator
Parameters
• init?: Partial
<LLMQuestionGenerator
>
Returns
Overrides
Source
packages/core/src/QuestionGenerator.ts:28
Properties
llm
llm:
LLM
<object
,object
>
Source
packages/core/src/QuestionGenerator.ts:24
outputParser
outputParser:
BaseOutputParser
<StructuredOutput
<SubQuestion
[]>>
Source
packages/core/src/QuestionGenerator.ts:26
prompt()
prompt: (
__namedParameters
) =>string
Parameters
• __namedParameters
• __namedParameters.queryStr: undefined
| string
= ""
• __namedParameters.toolsStr: undefined
| string
= ""
Returns
string
Source
packages/core/src/QuestionGenerator.ts:25
Methods
_getPromptModules()
protected
_getPromptModules():Record
<string
,any
>
Returns
Record
<string
, any
>
Inherited from
PromptMixin
. _getPromptModules
Source
packages/core/src/prompts/Mixin.ts:82
_getPrompts()
protected
_getPrompts():object
Returns
object
Overrides
Source
packages/core/src/QuestionGenerator.ts:36
_updatePrompts()
protected
_updatePrompts(promptsDict
):void
Parameters
• promptsDict
• promptsDict.subQuestion
Returns
void
Overrides
Source
packages/core/src/QuestionGenerator.ts:42
generate()
generate(
tools
,query
):Promise
<SubQuestion
[]>
Parameters
• tools: ToolMetadata
[]
• query: string
Returns
Promise
<SubQuestion
[]>
Implementation of
BaseQuestionGenerator.generate
Source
packages/core/src/QuestionGenerator.ts:50
getPrompts()
getPrompts():
PromptsDict
Returns all prompts from the mixin and its modules
Returns
PromptsDict
Inherited from
Source
packages/core/src/prompts/Mixin.ts:27
updatePrompts()
updatePrompts(
promptsDict
):void
Updates the prompts in the mixin and its modules
Parameters
• promptsDict: PromptsDict
Returns
void
Inherited from
Source
packages/core/src/prompts/Mixin.ts:48
validatePrompts()
validatePrompts(
promptsDict
,moduleDict
):void
Validates the prompt keys and module keys