Class: TreeSummarize
TreeSummarize repacks the text chunks into the smallest possible number of chunks and then summarizes them, then recursively does so until there's one chunk left.
Extends
Implements
Constructors
new TreeSummarize()
new TreeSummarize(
serviceContext
?,summaryTemplate
?):TreeSummarize
Parameters
• serviceContext?: ServiceContext
• summaryTemplate?
Returns
Overrides
Source
packages/llamaindex/src/synthesizers/builders.ts:286
Properties
llm
llm:
LLM
<object
,object
>
Source
packages/llamaindex/src/synthesizers/builders.ts:282
promptHelper
promptHelper:
PromptHelper
Source
packages/llamaindex/src/synthesizers/builders.ts:283
summaryTemplate()
summaryTemplate: (
__namedParameters
) =>string
Parameters
• __namedParameters
• __namedParameters.context: undefined
| string
= ""
• __namedParameters.query: undefined
| string
= ""
Returns
string
Source
packages/llamaindex/src/synthesizers/builders.ts:284
Methods
_getPromptModules()
protected
_getPromptModules():Record
<string
,any
>
Returns
Record
<string
, any
>
Inherited from
PromptMixin
. _getPromptModules
Source
packages/llamaindex/src/prompts/Mixin.ts:82
_getPrompts()
protected
_getPrompts():object
Returns
object
summaryTemplate()
summaryTemplate: (
__namedParameters
) =>string
Parameters
• __namedParameters
• __namedParameters.context: undefined
| string
= ""
• __namedParameters.query: undefined
| string
= ""
Returns
string
Overrides
Source
packages/llamaindex/src/synthesizers/builders.ts:297
_updatePrompts()
protected
_updatePrompts(prompts
):void
Parameters
• prompts
• prompts.summaryTemplate
Returns
void
Overrides
Source
packages/llamaindex/src/synthesizers/builders.ts:303
getPrompts()
getPrompts():
PromptsDict
Returns all prompts from the mixin and its modules
Returns
PromptsDict
Implementation of
Inherited from
Source
packages/llamaindex/src/prompts/Mixin.ts:27
getResponse()
getResponse(params)
getResponse(
params
):Promise
<AsyncIterable
<string
>>
Get the response from a query and a list of text chunks.
Parameters
• params: ResponseBuilderParamsStreaming
Returns
Promise
<AsyncIterable
<string
>>
Implementation of
Source
packages/llamaindex/src/synthesizers/builders.ts:311
getResponse(params)
getResponse(
params
):Promise
<string
>
Parameters
• params: ResponseBuilderParamsNonStreaming
Returns
Promise
<string
>
Implementation of
Source
packages/llamaindex/src/synthesizers/builders.ts:314
updatePrompts()
updatePrompts(
promptsDict
):void
Updates the prompts in the mixin and its modules
Parameters
• promptsDict: PromptsDict
Returns
void