Ga naar hoofdinhoud

Class: MultiModalResponseSynthesizer

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

Hierarchy

Implements

Constructors

constructor

new MultiModalResponseSynthesizer(«destructured»?): MultiModalResponseSynthesizer

Parameters

NameType
«destructured»Partial<MultiModalResponseSynthesizer>

Returns

MultiModalResponseSynthesizer

Overrides

PromptMixin.constructor

Defined in

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

Properties

metadataMode

metadataMode: MetadataMode

Defined in

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


serviceContext

Optional serviceContext: ServiceContext

Defined in

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


textQATemplate

textQATemplate: (__namedParameters: { context: undefined | string = ""; query: undefined | string = "" }) => string

Type declaration

▸ («destructured»): string

Parameters
NameTypeDefault value
«destructured»Objectundefined
› contextundefined | string""
› queryundefined | string""
Returns

string

Defined in

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

Methods

_getPromptModules

_getPromptModules(): Record<string, any>

Returns

Record<string, any>

Inherited from

PromptMixin._getPromptModules

Defined in

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


_getPrompts

_getPrompts(): Object

Returns

Object

NameType
textQATemplate(__namedParameters: { context: undefined | string = ""; query: undefined | string = "" }) => string

Overrides

PromptMixin._getPrompts

Defined in

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


_updatePrompts

_updatePrompts(promptsDict): void

Parameters

NameType
promptsDictObject
promptsDict.textQATemplate(__namedParameters: { context: undefined | string = ""; query: undefined | string = "" }) => string

Returns

void

Overrides

PromptMixin._updatePrompts

Defined in

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


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/MultiModalResponseSynthesizer.ts:53

synthesize(params): Promise<Response>

Parameters

NameType
paramsSynthesizeParamsNonStreaming

Returns

Promise<Response>

Implementation of

BaseSynthesizer.synthesize

Defined in

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


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