Class: TitleExtractor()
Extract title from a list of nodes.
Extends
TitleExtractor<
Options
>(nodes
,options
?):Promise
<BaseNode
<Metadata
>[]>
Extract title from a list of nodes.
Type Parameters
• Options extends Record
<string
, unknown
>
Parameters
• options?: Options
Returns
Defined in
packages/llamaindex/src/extractors/MetadataExtractors.ts:130
Constructors
new TitleExtractor()
new TitleExtractor(
options
?):TitleExtractor
Constructor for the TitleExtractor class.
Parameters
• options?: TitleExtractorsArgs
Returns
Overrides
Defined in
packages/llamaindex/src/extractors/MetadataExtractors.ts:170
Properties
combineTemplate
combineTemplate:
TitleCombinePrompt
The prompt template to merge title with..
Defined in
packages/llamaindex/src/extractors/MetadataExtractors.ts:161
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:171
inPlace
inPlace:
boolean
=true
Inherited from
Defined in
packages/llamaindex/src/extractors/types.ts:17
isTextNodeOnly
isTextNodeOnly:
boolean
=false
Can work for mixture of text and non-text nodes
Default
false
Overrides
Defined in
packages/llamaindex/src/extractors/MetadataExtractors.ts:142
llm
llm:
LLM
<object
,object
>
LLM instance.
Defined in
packages/llamaindex/src/extractors/MetadataExtractors.ts:135
metadataMode
metadataMode:
MetadataMode
=MetadataMode.ALL
Inherited from
Defined in
packages/llamaindex/src/extractors/types.ts:15
nodeTemplate
nodeTemplate:
TitleExtractorPrompt
The prompt template to use for the title extractor.
Defined in
packages/llamaindex/src/extractors/MetadataExtractors.ts:155
nodes
nodes:
number
=5
Number of nodes to extrct titles from.
Default
5
Defined in
packages/llamaindex/src/extractors/MetadataExtractors.ts:149
numWorkers
numWorkers:
number
=4
Inherited from
Defined in
packages/llamaindex/src/extractors/types.ts:18
showProgress
showProgress:
boolean
=true
Inherited from
Defined in
packages/llamaindex/src/extractors/types.ts:14
Methods
extract()
extract(
nodes
):Promise
<ExtractTitle
[]>
Extract titles from a list of nodes.
Parameters
Nodes to extract titles from.
Returns
Promise
<ExtractTitle
[]>
Titles extracted from the nodes.
Overrides
Defined in
packages/llamaindex/src/extractors/MetadataExtractors.ts:196
processNodes()
processNodes(
nodes
,excludedEmbedMetadataKeys
,excludedLlmMetadataKeys
):Promise
<BaseNode
<Metadata
>[]>
Parameters
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
Metadata extracted from the nodes.