Class: MultiModalResponseSynthesizer
A BaseSynthesizer is used to generate a response from a query and a list of nodes.
Hierarchy
-
↳
MultiModalResponseSynthesizer
Implements
Constructors
constructor
• new MultiModalResponseSynthesizer(«destructured»?
): MultiModalResponseSynthesizer
Parameters
Name | Type |
---|---|
«destructured» | Partial <MultiModalResponseSynthesizer > |
Returns
Overrides
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
Name | Type | Default value |
---|---|---|
«destructured» | Object | undefined |
› context | undefined | string | "" |
› query | undefined | string | "" |
Returns
string
Defined in
packages/core/src/synthesizers/MultiModalResponseSynthesizer.ts:25
Methods
_getPromptModules
▸ _getPromptModules(): Record
<string
, any
>
Returns
Record
<string
, any
>
Inherited from
Defined in
packages/core/src/prompts/Mixin.ts:83
_getPrompts
▸ _getPrompts(): Object
Returns
Object
Name | Type |
---|---|
textQATemplate | (__namedParameters : { context : undefined | string = ""; query : undefined | string = "" }) => string |
Overrides
Defined in
packages/core/src/synthesizers/MultiModalResponseSynthesizer.ts:39
_updatePrompts
▸ _updatePrompts(promptsDict
): void
Parameters
Name | Type |
---|---|
promptsDict | Object |
promptsDict.textQATemplate | (__namedParameters : { context : undefined | string = ""; query : undefined | string = "" }) => string |
Returns
void
Overrides
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
Defined in
packages/core/src/prompts/Mixin.ts:27
synthesize
▸ synthesize(params
): Promise
<AsyncIterable
<Response
>>
Parameters
Name | Type |
---|---|
params | SynthesizeParamsStreaming |
Returns
Promise
<AsyncIterable
<Response
>>
Implementation of
Defined in
packages/core/src/synthesizers/MultiModalResponseSynthesizer.ts:53
▸ synthesize(params
): Promise
<Response
>
Parameters
Name | Type |
---|---|
params | SynthesizeParamsNonStreaming |
Returns
Promise
<Response
>
Implementation of
Defined in
packages/core/src/synthesizers/MultiModalResponseSynthesizer.ts:56
updatePrompts
▸ updatePrompts(promptsDict
): void
Updates the prompts in the mixin and its modules
Parameters
Name | Type |
---|---|
promptsDict | PromptsDict |
Returns
void
Inherited from
Defined in
packages/core/src/prompts/Mixin.ts:48
validatePrompts
▸ validatePrompts(promptsDict
, moduleDict
): void
Validates the prompt keys and module keys
Parameters
Name | Type |
---|---|
promptsDict | PromptsDict |
moduleDict | ModuleDict |
Returns
void