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:22
Properties
metadataMode
metadataMode:
MetadataMode
Defined in
packages/llamaindex/src/synthesizers/ResponseSynthesizer.ts:20
responseBuilder
responseBuilder:
ResponseBuilder
Defined in
packages/llamaindex/src/synthesizers/ResponseSynthesizer.ts:19
Methods
_getPromptModules()
_getPromptModules():
object
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
object
Implementation of
BaseSynthesizer
._getPromptModules
Overrides
Defined in
packages/llamaindex/src/synthesizers/ResponseSynthesizer.ts:38
_getPrompts()
protected
_getPrompts():object
Returns
object
Implementation of
Overrides
Defined in
packages/llamaindex/src/synthesizers/ResponseSynthesizer.ts:42
_updatePrompts()
protected
_updatePrompts(promptsRecord
):void
Parameters
• promptsRecord: PromptsRecord
Returns
void
Implementation of
BaseSynthesizer
._updatePrompts
Overrides
Defined in
packages/llamaindex/src/synthesizers/ResponseSynthesizer.ts:49
getPrompts()
getPrompts():
PromptsRecord
Returns
Implementation of
Inherited from
Defined in
packages/core/dist/prompts/index.d.ts:58
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:53
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:57
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
BaseSynthesizer
.validatePrompts
Inherited from
Defined in
packages/core/dist/prompts/index.d.ts:57