Class: SummaryExtractor()
Extract summary from a list of nodes.
Extends
SummaryExtractor<
Options
>(nodes
,options
?):BaseNode
<Metadata
>[] |Promise
<BaseNode
<Metadata
>[]>
Extract summary from a list of nodes.
Type Parameters
• Options extends Record
<string
, unknown
>
Parameters
• options?: Options
Returns
BaseNode
<Metadata
>[] | Promise
<BaseNode
<Metadata
>[]>
Defined in
packages/llamaindex/src/extractors/MetadataExtractors.ts:405
Constructors
new SummaryExtractor()
new SummaryExtractor(
options
?):SummaryExtractor
Parameters
• options?: SummaryExtractArgs
Returns
Overrides
Defined in
packages/llamaindex/src/extractors/MetadataExtractors.ts:428
Properties
disableTemplateRewrite
disableTemplateRewrite:
boolean
=false
Inherited from
BaseExtractor
.disableTemplateRewrite
Defined in
packages/llamaindex/src/extractors/types.ts:16
id
id:
string
Inherited from
Defined in
packages/core/schema/dist/index.d.ts:172
inPlace
inPlace:
boolean
=true
Inherited from
Defined in
packages/llamaindex/src/extractors/types.ts:17
isTextNodeOnly
isTextNodeOnly:
boolean
=true
Inherited from
Defined in
packages/llamaindex/src/extractors/types.ts:13
llm
llm:
LLM
<object
,object
>
LLM instance.
Defined in
packages/llamaindex/src/extractors/MetadataExtractors.ts:410
metadataMode
metadataMode:
MetadataMode
=MetadataMode.ALL
Inherited from
Defined in
packages/llamaindex/src/extractors/types.ts:15
numWorkers
numWorkers:
number
=4
Inherited from
Defined in
packages/llamaindex/src/extractors/types.ts:18
promptTemplate
promptTemplate:
SummaryPrompt
The prompt template to use for the summary extractor.
Defined in
packages/llamaindex/src/extractors/MetadataExtractors.ts:422
showProgress
showProgress:
boolean
=true
Inherited from
Defined in
packages/llamaindex/src/extractors/types.ts:14
summaries
summaries:
string
[]
List of summaries to extract: 'self', 'prev', 'next'
Defined in
packages/llamaindex/src/extractors/MetadataExtractors.ts:416
Methods
extract()
extract(
nodes
):Promise
<object
[] |ExtractSummary
[]>
Extract summaries from a list of nodes.