Class: SimpleResponseBuilder
A response builder that just concatenates responses.
Extends
Implements
Constructors
new SimpleResponseBuilder()
new SimpleResponseBuilder(
serviceContext
?,textQATemplate
?):SimpleResponseBuilder
Parameters
• serviceContext?: ServiceContext
• textQATemplate?: TextQAPrompt
Returns
Overrides
Defined in
packages/llamaindex/src/synthesizers/builders.ts:43
Properties
llm
llm:
LLM
<object
,object
>
Defined in
packages/llamaindex/src/synthesizers/builders.ts:40
textQATemplate
textQATemplate:
TextQAPrompt
Defined in
packages/llamaindex/src/synthesizers/builders.ts:41
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
Implementation of
ResponseBuilder
._getPromptModules
Overrides
Defined in
packages/llamaindex/src/synthesizers/builders.ts:59
_getPrompts()
protected
_getPrompts():PromptsRecord
Returns
Implementation of
Overrides
Defined in
packages/llamaindex/src/synthesizers/builders.ts:49
_updatePrompts()
protected
_updatePrompts(prompts
):void
Parameters
• prompts
• prompts.textQATemplate: TextQAPrompt
Returns
void
Implementation of
ResponseBuilder
._updatePrompts
Overrides
Defined in
packages/llamaindex/src/synthesizers/builders.ts:54
getPrompts()
getPrompts():
PromptsRecord
Returns
Implementation of
Inherited from
Defined in
packages/core/dist/prompts/index.d.ts:58
getResponse()
getResponse(query, stream)
getResponse(
query
,stream
):Promise
<AsyncIterable
<string
>>
Get the response from a query and a list of text chunks.
Parameters
• query: ResponseBuilderQuery
• stream: true
Returns
Promise
<AsyncIterable
<string
>>
Implementation of
Defined in
packages/llamaindex/src/synthesizers/builders.ts:63
getResponse(query, stream)
getResponse(
query
,stream
?):Promise
<string
>
Get the response from a query and a list of text chunks.
Parameters
• query: ResponseBuilderQuery
• stream?: false
Returns
Promise
<string
>
Implementation of
Defined in
packages/llamaindex/src/synthesizers/builders.ts:67
updatePrompts()
updatePrompts(
prompts
):void
Parameters
• prompts: PromptsRecord
Returns
void
Implementation of
Inherited from
Defined in
packages/core/dist/prompts/index.d.ts:59
validatePrompts()
validatePrompts(
promptsDict
,moduleDict
):void
Parameters
• promptsDict: PromptsRecord
• moduleDict: ModuleRecord
Returns
void
Implementation of
ResponseBuilder
.validatePrompts
Inherited from
Defined in
packages/core/dist/prompts/index.d.ts:57