Ga naar hoofdinhoud

Class: MultiModalResponseSynthesizer

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

Extends

Implements

Constructors

new MultiModalResponseSynthesizer()

new MultiModalResponseSynthesizer(__namedParameters): MultiModalResponseSynthesizer

Parameters

__namedParameters: Partial <MultiModalResponseSynthesizer>= {}

Returns

MultiModalResponseSynthesizer

Overrides

PromptMixin . constructor

Source

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

Properties

metadataMode

metadataMode: MetadataMode

Source

packages/core/src/synthesizers/MultiModalResponseSynthesizer.ts:21


serviceContext?

optional serviceContext: ServiceContext

Source

packages/core/src/synthesizers/MultiModalResponseSynthesizer.ts:20


textQATemplate()

textQATemplate: (__namedParameters) => string

Parameters

__namedParameters

__namedParameters.context: undefined | string= ""

__namedParameters.query: undefined | string= ""

Returns

string

Source

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

Methods

_getPromptModules()

protected _getPromptModules(): Record<string, any>

Returns

Record<string, any>

Inherited from

PromptMixin . _getPromptModules

Source

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


_getPrompts()

protected _getPrompts(): object

Returns

object

textQATemplate()

textQATemplate: (__namedParameters) => string

Parameters

__namedParameters

__namedParameters.context: undefined | string= ""

__namedParameters.query: undefined | string= ""

Returns

string

Overrides

PromptMixin . _getPrompts

Source

packages/core/src/synthesizers/MultiModalResponseSynthesizer.ts:36


_updatePrompts()

protected _updatePrompts(promptsDict): void

Parameters

promptsDict

promptsDict.textQATemplate

Returns

void

Overrides

PromptMixin . _updatePrompts

Source

packages/core/src/synthesizers/MultiModalResponseSynthesizer.ts:42


getPrompts()

getPrompts(): PromptsDict

Returns all prompts from the mixin and its modules

Returns

PromptsDict

Inherited from

PromptMixin . getPrompts

Source

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


synthesize()

synthesize(params)

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

Parameters

params: SynthesizeParamsStreaming

Returns

Promise<AsyncIterable <Response>>

Implementation of

BaseSynthesizer . synthesize

Source

packages/core/src/synthesizers/MultiModalResponseSynthesizer.ts:50

synthesize(params)

synthesize(params): Promise <Response>

Parameters

params: SynthesizeParamsNonStreaming

Returns

Promise <Response>

Implementation of

BaseSynthesizer . synthesize

Source

packages/core/src/synthesizers/MultiModalResponseSynthesizer.ts:53


updatePrompts()

updatePrompts(promptsDict): void

Updates the prompts in the mixin and its modules

Parameters

promptsDict: PromptsDict

Returns

void

Inherited from

PromptMixin . updatePrompts

Source

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


validatePrompts()

validatePrompts(promptsDict, moduleDict): void

Validates the prompt keys and module keys

Parameters

promptsDict: PromptsDict

moduleDict: ModuleDict

Returns

void

Inherited from

PromptMixin . validatePrompts

Source

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