跳到主要内容

Class: CompactAndRefine

CompactAndRefine is a slight variation of Refine that first compacts the text chunks into the smallest possible number of chunks.

Hierarchy

Constructors

constructor

new CompactAndRefine(serviceContext, textQATemplate?, refineTemplate?)

Parameters

NameType
serviceContextServiceContext
textQATemplate?(__namedParameters: Object) => string
refineTemplate?(__namedParameters: Object) => string

Inherited from

Refine.constructor

Defined in

packages/core/src/ResponseSynthesizer.ts:82

Properties

refineTemplate

refineTemplate: (__namedParameters: Object) => string

Type declaration

▸ («destructured»): string

Parameters
NameType
«destructured»Object
Returns

string

Inherited from

Refine.refineTemplate

Defined in

packages/core/src/ResponseSynthesizer.ts:80


serviceContext

serviceContext: ServiceContext

Inherited from

Refine.serviceContext

Defined in

packages/core/src/ResponseSynthesizer.ts:78


textQATemplate

textQATemplate: (__namedParameters: Object) => string

Type declaration

▸ («destructured»): string

Parameters
NameType
«destructured»Object
Returns

string

Inherited from

Refine.textQATemplate

Defined in

packages/core/src/ResponseSynthesizer.ts:79

Methods

getResponse

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

Parameters

NameType
querystring
textChunksstring[]
parentEvent?Event
prevResponse?string

Returns

Promise<string>

Overrides

Refine.getResponse

Defined in

packages/core/src/ResponseSynthesizer.ts:185