Ga naar hoofdinhoud

Class: BaseExtractor

Hierarchy

Implements

Constructors

constructor

new BaseExtractor(): BaseExtractor

Returns

BaseExtractor

Properties

disableTemplateRewrite

disableTemplateRewrite: boolean = false

Defined in

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


inPlace

inPlace: boolean = true

Defined in

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


isTextNodeOnly

isTextNodeOnly: boolean = true

Defined in

packages/core/src/extractors/types.ts:9


metadataMode

metadataMode: MetadataMode = MetadataMode.ALL

Defined in

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


numWorkers

numWorkers: number = 4

Defined in

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


showProgress

showProgress: boolean = true

Defined in

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

Methods

extract

extract(nodes): Promise<Record<string, any>[]>

Parameters

NameType
nodesBaseNode<Metadata>[]

Returns

Promise<Record<string, any>[]>

Defined in

packages/core/src/extractors/types.ts:16


processNodes

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

Parameters

NameTypeDefault valueDescription
nodesBaseNode<Metadata>[]undefinedNodes to extract metadata from.
excludedEmbedMetadataKeysundefined | string[]undefinedMetadata keys to exclude from the embedding.
excludedLlmMetadataKeysundefined | string[]undefinedMetadata keys to exclude from the LLM.

Returns

Promise<BaseNode<Metadata>[]>

Metadata extracted from the nodes.

Defined in

packages/core/src/extractors/types.ts:33


transform

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

Parameters

NameType
nodesBaseNode<Metadata>[]
options?any

Returns

Promise<BaseNode<Metadata>[]>

Implementation of

TransformComponent.transform

Defined in

packages/core/src/extractors/types.ts:18