Interface: ResponseBuilder
A ResponseBuilder is used in a response synthesizer to generate a response from multiple response chunks.
Hierarchy
-
Partial
<PromptMixin
>↳
ResponseBuilder
Implemented by
Methods
getPrompts
▸ getPrompts(): PromptsDict
Returns all prompts from the mixin and its modules
Returns
PromptsDict
Inherited from
Partial.getPrompts
Defined in
packages/core/src/prompts/Mixin.ts:27
getResponse
▸ getResponse(params
): Promise
<AsyncIterable
<string
>>
Get the response from a query and a list of text chunks.
Parameters
Name | Type |
---|---|
params | ResponseBuilderParamsStreaming |
Returns
Promise
<AsyncIterable
<string
>>
Defined in
packages/core/src/synthesizers/types.ts:54
▸ getResponse(params
): Promise
<string
>
Parameters
Name | Type |
---|---|
params | ResponseBuilderParamsNonStreaming |
Returns
Promise
<string
>
Defined in
packages/core/src/synthesizers/types.ts:57
updatePrompts
▸ updatePrompts(promptsDict
): void
Updates the prompts in the mixin and its modules
Parameters
Name | Type |
---|---|
promptsDict | PromptsDict |
Returns
void
Inherited from
Partial.updatePrompts
Defined in
packages/core/src/prompts/Mixin.ts:48
validatePrompts
▸ validatePrompts(promptsDict
, moduleDict
): void
Validates the prompt keys and module keys