Interface: ResponseBuilder
A ResponseBuilder is used in a response synthesizer to generate a response from multiple response chunks.
Extends
Partial
<PromptMixin
>
Methods
getPrompts()?
optional
getPrompts():PromptsDict
Returns all prompts from the mixin and its modules
Returns
PromptsDict
Inherited from
Partial.getPrompts
Defined in
packages/llamaindex/src/prompts/Mixin.ts:27
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
>>
Defined in
packages/llamaindex/src/synthesizers/types.ts:35
getResponse(query, stream)
getResponse(
query
,stream
?):Promise
<string
>
Parameters
• query: ResponseBuilderQuery
• stream?: false
Returns
Promise
<string
>
Defined in
packages/llamaindex/src/synthesizers/types.ts:39
updatePrompts()?
optional
updatePrompts(promptsDict
):void
Updates the prompts in the mixin and its modules
Parameters
• promptsDict: PromptsDict
Returns
void
Inherited from
Partial.updatePrompts
Defined in
packages/llamaindex/src/prompts/Mixin.ts:48
validatePrompts()?
optional
validatePrompts(promptsDict
,moduleDict
):void
Validates the prompt keys and module keys
Parameters
• promptsDict: PromptsDict
• moduleDict: ModuleDict
Returns
void
Inherited from
Partial.validatePrompts