본문으로 건너뛰기

Class: SummaryExtractor

Extract summary from a list of nodes.

Extends

Constructors

new SummaryExtractor()

new SummaryExtractor(options?): SummaryExtractor

Parameters

options?: SummaryExtractArgs

Returns

SummaryExtractor

Overrides

BaseExtractor . constructor

Source

packages/llamaindex/src/extractors/MetadataExtractors.ts:394

Properties

disableTemplateRewrite

disableTemplateRewrite: boolean = false

Inherited from

BaseExtractor . disableTemplateRewrite

Source

packages/llamaindex/src/extractors/types.ts:13


inPlace

inPlace: boolean = true

Inherited from

BaseExtractor . inPlace

Source

packages/llamaindex/src/extractors/types.ts:14


isTextNodeOnly

isTextNodeOnly: boolean = true

Inherited from

BaseExtractor . isTextNodeOnly

Source

packages/llamaindex/src/extractors/types.ts:10


llm

llm: LLM<object, object>

LLM instance.

Source

packages/llamaindex/src/extractors/MetadataExtractors.ts:376


metadataMode

metadataMode: MetadataMode = MetadataMode.ALL

Inherited from

BaseExtractor . metadataMode

Source

packages/llamaindex/src/extractors/types.ts:12


nextSummary

private nextSummary: boolean

Source

packages/llamaindex/src/extractors/MetadataExtractors.ts:392


numWorkers

numWorkers: number = 4

Inherited from

BaseExtractor . numWorkers

Source

packages/llamaindex/src/extractors/types.ts:15


prevSummary

private prevSummary: boolean

Source

packages/llamaindex/src/extractors/MetadataExtractors.ts:391


promptTemplate

promptTemplate: string

The prompt template to use for the summary extractor.

Source

packages/llamaindex/src/extractors/MetadataExtractors.ts:388


selfSummary

private selfSummary: boolean

Source

packages/llamaindex/src/extractors/MetadataExtractors.ts:390


showProgress

showProgress: boolean = true

Inherited from

BaseExtractor . showProgress

Source

packages/llamaindex/src/extractors/types.ts:11


summaries

summaries: string[]

List of summaries to extract: 'self', 'prev', 'next'

Source

packages/llamaindex/src/extractors/MetadataExtractors.ts:382

Methods

extract()

extract(nodes): Promise<object[] | ExtractSummary[]>

Extract summaries from a list of nodes.

Parameters

nodes: BaseNode <Metadata>[]

Nodes to extract summaries from.

Returns

Promise<object[] | ExtractSummary[]>

Summaries extracted from the nodes.

Overrides

BaseExtractor . extract

Source

packages/llamaindex/src/extractors/MetadataExtractors.ts:443


generateNodeSummary()

generateNodeSummary(node): Promise<string>

Extract summary from a node.

Parameters

node: BaseNode <Metadata>

Node to extract summary from.

Returns

Promise<string>

Summary extracted from the node.

Source

packages/llamaindex/src/extractors/MetadataExtractors.ts:420


processNodes()

processNodes(nodes, excludedEmbedMetadataKeys, excludedLlmMetadataKeys): Promise <BaseNode <Metadata>[]>

Parameters

nodes: BaseNode <Metadata>[]

Nodes to extract metadata from.

excludedEmbedMetadataKeys: undefined | string[]= undefined

Metadata keys to exclude from the embedding.

excludedLlmMetadataKeys: undefined | string[]= undefined

Metadata keys to exclude from the LLM.

Returns

Promise <BaseNode <Metadata>[]>

Metadata extracted from the nodes.

Inherited from

BaseExtractor . processNodes

Source

packages/llamaindex/src/extractors/types.ts:34


transform()

transform(nodes, options?): Promise <BaseNode <Metadata>[]>

Parameters

nodes: BaseNode <Metadata>[]

options?: any

Returns

Promise <BaseNode <Metadata>[]>

Inherited from

BaseExtractor . transform

Source

packages/llamaindex/src/extractors/types.ts:19