メインコンテンツまでスキップ

Class: ResponseSynthesizer

A ResponseSynthesizer is used to generate a response from a query and a list of nodes.

Hierarchy

Implements

Constructors

constructor

new ResponseSynthesizer(«destructured»?): ResponseSynthesizer

Parameters

NameTypeDefault value
«destructured»Object{}
› metadataMode?MetadataModeMetadataMode.NONE
› responseBuilder?ResponseBuilderundefined
› serviceContext?ServiceContextundefined

Returns

ResponseSynthesizer

Overrides

PromptMixin.constructor

Defined in

packages/core/src/synthesizers/ResponseSynthesizer.ts:25

Properties

metadataMode

metadataMode: MetadataMode

Defined in

packages/core/src/synthesizers/ResponseSynthesizer.ts:23


responseBuilder

responseBuilder: ResponseBuilder

Defined in

packages/core/src/synthesizers/ResponseSynthesizer.ts:22

Methods

_getPromptModules

_getPromptModules(): Object

Returns

Object

Overrides

PromptMixin._getPromptModules

Defined in

packages/core/src/synthesizers/ResponseSynthesizer.ts:41


_getPrompts

_getPrompts(): Object

Returns

Object

Overrides

PromptMixin._getPrompts

Defined in

packages/core/src/synthesizers/ResponseSynthesizer.ts:45


_updatePrompts

_updatePrompts(promptsDict): void

Parameters

NameType
promptsDictObject

Returns

void

Overrides

PromptMixin._updatePrompts

Defined in

packages/core/src/synthesizers/ResponseSynthesizer.ts:52


getPrompts

getPrompts(): PromptsDict

Returns all prompts from the mixin and its modules

Returns

PromptsDict

Inherited from

PromptMixin.getPrompts

Defined in

packages/core/src/prompts/Mixin.ts:27


synthesize

synthesize(params): Promise<AsyncIterable<Response>>

Parameters

NameType
paramsSynthesizeParamsStreaming

Returns

Promise<AsyncIterable<Response>>

Implementation of

BaseSynthesizer.synthesize

Defined in

packages/core/src/synthesizers/ResponseSynthesizer.ts:58

synthesize(params): Promise<Response>

Parameters

NameType
paramsSynthesizeParamsNonStreaming

Returns

Promise<Response>

Implementation of

BaseSynthesizer.synthesize

Defined in

packages/core/src/synthesizers/ResponseSynthesizer.ts:61


updatePrompts

updatePrompts(promptsDict): void

Updates the prompts in the mixin and its modules

Parameters

NameType
promptsDictPromptsDict

Returns

void

Inherited from

PromptMixin.updatePrompts

Defined in

packages/core/src/prompts/Mixin.ts:48


validatePrompts

validatePrompts(promptsDict, moduleDict): void

Validates the prompt keys and module keys

Parameters

NameType
promptsDictPromptsDict
moduleDictModuleDict

Returns

void

Inherited from

PromptMixin.validatePrompts

Defined in

packages/core/src/prompts/Mixin.ts:10