Class: CompactAndRefine
CompactAndRefine is a slight variation of Refine that first compacts the text chunks into the smallest possible number of chunks.
Hierarchy
↳
CompactAndRefine
Constructors
constructor
• new CompactAndRefine(serviceContext
, textQATemplate?
, refineTemplate?
)
Parameters
Name | Type |
---|---|
serviceContext | ServiceContext |
textQATemplate? | (__namedParameters : Object ) => string |
refineTemplate? | (__namedParameters : Object ) => string |
Inherited from
Defined in
packages/core/src/synthesizers/builders.ts:80
Properties
refineTemplate
• refineTemplate: (__namedParameters
: Object
) => string
Type declaration
▸ («destructured»
): string
Parameters
Name | Type |
---|---|
«destructured» | Object |
Returns
string
Inherited from
Defined in
packages/core/src/synthesizers/builders.ts:78
serviceContext
• serviceContext: ServiceContext
Inherited from
Defined in
packages/core/src/synthesizers/builders.ts:76
textQATemplate
• textQATemplate: (__namedParameters
: Object
) => string
Type declaration
▸ («destructured»
): string
Parameters
Name | Type |
---|---|
«destructured» | Object |
Returns
string
Inherited from
Defined in
packages/core/src/synthesizers/builders.ts:77
Methods
getResponse
▸ getResponse(query
, textChunks
, parentEvent?
, prevResponse?
): Promise
<string
>
Get the response from a query and a list of text chunks.
Parameters
Name | Type |
---|---|
query | string |
textChunks | string [] |
parentEvent? | Event |
prevResponse? | string |
Returns
Promise
<string
>