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?
): CompactAndRefine
Parameters
Name | Type |
---|---|
serviceContext? | ServiceContext |
textQATemplate? | (__namedParameters : { context : undefined | string = ""; query : undefined | string = "" }) => string |
refineTemplate? | (__namedParameters : { context : undefined | string = ""; existingAnswer : undefined | string = ""; query : undefined | string = "" }) => string |
Returns
Inherited from
Defined in
packages/core/src/synthesizers/builders.ts:88
Properties
llm
• llm: LLM
<object
, object
>
Inherited from
Defined in
packages/core/src/synthesizers/builders.ts:83
promptHelper
• promptHelper: PromptHelper
Inherited from
Defined in
packages/core/src/synthesizers/builders.ts:84
refineTemplate
• refineTemplate: (__namedParameters
: { context
: undefined
| string
= ""; existingAnswer
: undefined
| string
= ""; query
: undefined
| string
= "" }) => string
Type declaration
▸ («destructured»
): string
Parameters
Name | Type | Default value |
---|---|---|
«destructured» | Object | undefined |
› context | undefined | string | "" |
› existingAnswer | undefined | string | "" |
› query | undefined | string | "" |
Returns
string
Inherited from
Defined in
packages/core/src/synthesizers/builders.ts:86
textQATemplate
• textQATemplate: (__namedParameters
: { context
: undefined
| string
= ""; query
: undefined
| string
= "" }) => string
Type declaration
▸ («destructured»
): string
Parameters
Name | Type | Default value |
---|---|---|
«destructured» | Object | undefined |
› context | undefined | string | "" |
› query | undefined | string | "" |
Returns
string
Inherited from
Defined in
packages/core/src/synthesizers/builders.ts:85
Methods
_getPromptModules
▸ _getPromptModules(): Record
<string
, any
>
Returns
Record
<string
, any
>
Inherited from
Defined in
packages/core/src/prompts/Mixin.ts:82
_getPrompts
▸ _getPrompts(): Object
Returns
Object
Name | Type |
---|---|
refineTemplate | (__namedParameters : { context : undefined | string = ""; existingAnswer : undefined | string = ""; query : undefined | string = "" }) => string |
textQATemplate | (__namedParameters : { context : undefined | string = ""; existingAnswer : undefined | string = ""; query : undefined | string = "" }) => string |