Class: ResponseSynthesizer
A ResponseSynthesizer is used to generate a response from a query and a list of nodes.
Extends
Implements
Constructors
new ResponseSynthesizer()
new ResponseSynthesizer(
__namedParameters
):ResponseSynthesizer
Parameters
• __namedParameters = {}
• __namedParameters.metadataMode?: MetadataMode
= MetadataMode.NONE
• __namedParameters.responseBuilder?: ResponseBuilder
• __namedParameters.serviceContext?: ServiceContext
Returns
Overrides
Defined in
packages/llamaindex/src/synthesizers/ResponseSynthesizer.ts:23
Properties
metadataMode
metadataMode:
MetadataMode
Defined in
packages/llamaindex/src/synthesizers/ResponseSynthesizer.ts:21
responseBuilder
responseBuilder:
ResponseBuilder
Defined in
packages/llamaindex/src/synthesizers/ResponseSynthesizer.ts:20
Methods
_getPromptModules()
_getPromptModules():
object
Returns
object
Overrides
Defined in
packages/llamaindex/src/synthesizers/ResponseSynthesizer.ts:39
_getPrompts()
protected
_getPrompts():object
Returns
object
Overrides
Defined in
packages/llamaindex/src/synthesizers/ResponseSynthesizer.ts:43
_updatePrompts()
protected
_updatePrompts(promptsDict
):void
Parameters
• promptsDict
Returns
void
Overrides
Defined in
packages/llamaindex/src/synthesizers/ResponseSynthesizer.ts:50
getPrompts()
getPrompts():
PromptsDict
Returns all prompts from the mixin and its modules
Returns
PromptsDict
Inherited from
Defined in
packages/llamaindex/src/prompts/Mixin.ts:27
synthesize()
synthesize(query, stream)
synthesize(
query
,stream
):Promise
<AsyncIterable
<EngineResponse
>>
Parameters
• query: SynthesizeQuery
• stream: true
Returns
Promise
<AsyncIterable
<EngineResponse
>>
Implementation of
Defined in
packages/llamaindex/src/synthesizers/ResponseSynthesizer.ts:56
synthesize(query, stream)
synthesize(
query
,stream
?):Promise
<EngineResponse
>
Parameters
• query: SynthesizeQuery
• stream?: false
Returns
Promise
<EngineResponse
>
Implementation of
Defined in
packages/llamaindex/src/synthesizers/ResponseSynthesizer.ts:60
updatePrompts()
updatePrompts(
promptsDict
):void
Updates the prompts in the mixin and its modules
Parameters
• promptsDict: PromptsDict
Returns
void
Inherited from
Defined in
packages/llamaindex/src/prompts/Mixin.ts:48
validatePrompts()
validatePrompts(
promptsDict
,moduleDict
):void
Validates the prompt keys and module keys
Parameters
• promptsDict: PromptsDict
• moduleDict: ModuleDict
Returns
void