Skip to main content

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.

Implements

Constructors

constructor

new TreeSummarize(serviceContext, summaryTemplate?): TreeSummarize

Parameters

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

Returns

TreeSummarize

Defined in

packages/core/src/synthesizers/builders.ts:266

Properties

llm

llm: LLM

Defined in

packages/core/src/synthesizers/builders.ts:262


promptHelper

promptHelper: PromptHelper

Defined in

packages/core/src/synthesizers/builders.ts:263


summaryTemplate

summaryTemplate: (__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/builders.ts:264

Methods

getResponse

getResponse(params): Promise<AsyncIterable<string>>

Get the response from a query and a list of text chunks.

Parameters

NameType
paramsResponseBuilderParamsStreaming

Returns

Promise<AsyncIterable<string>>

Implementation of

ResponseBuilder.getResponse

Defined in

packages/core/src/synthesizers/builders.ts:275

getResponse(params): Promise<string>

Parameters

NameType
paramsResponseBuilderParamsNonStreaming

Returns

Promise<string>

Implementation of

ResponseBuilder.getResponse

Defined in

packages/core/src/synthesizers/builders.ts:278