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?)

Parameters

NameType
serviceContextServiceContext
summaryTemplate?(__namedParameters: Object) => string

Defined in

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

Properties

serviceContext

serviceContext: ServiceContext

Defined in

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


summaryTemplate

summaryTemplate: (__namedParameters: Object) => string

Type declaration

▸ («destructured»): string

Parameters
NameType
«destructured»Object
Returns

string

Defined in

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

Methods

getResponse

getResponse(query, textChunks, parentEvent?): Promise<string>

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

Parameters

NameType
querystring
textChunksstring[]
parentEvent?Event

Returns

Promise<string>

Implementation of

BaseResponseBuilder.getResponse

Defined in

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