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

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:27

Properties

metadataMode

metadataMode: MetadataMode

Defined in

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


responseBuilder

responseBuilder: ResponseBuilder

Defined in

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


serviceContext

serviceContext: ServiceContext

Defined in

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

Methods

_getPromptModules

_getPromptModules(): Object

Returns

Object

Overrides

PromptMixin._getPromptModules

Defined in

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


_getPrompts

_getPrompts(): Object

Returns

Object

Overrides

PromptMixin._getPrompts

Defined in

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


_updatePrompts

_updatePrompts(promptsDict): void

Parameters

NameType
promptsDictObject

Returns

void

Overrides

PromptMixin._updatePrompts

Defined in

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


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:61

synthesize(params): Promise<Response>

Parameters

NameType
paramsSynthesizeParamsNonStreaming

Returns

Promise<Response>

Implementation of

BaseSynthesizer.synthesize

Defined in

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


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