Class: abstract
BaseNode<T>
Generic abstract class for retrievable nodes
Extended by
Type parameters
• T extends Metadata
= Metadata
Constructors
new BaseNode()
new BaseNode<
T
>(init
?):BaseNode
<T
>
Parameters
• init?: Partial
<BaseNode
<T
>>
Returns
BaseNode
<T
>
Source
Properties
embedding?
optional
embedding:number
[]
Source
excludedEmbedMetadataKeys
excludedEmbedMetadataKeys:
string
[] =[]
Source
excludedLlmMetadataKeys
excludedLlmMetadataKeys:
string
[] =[]
Source
hash
hash:
string
=""
Source
id_
id_:
string
The unique ID of the Node/Document. The trailing underscore is here to avoid collisions with the id keyword in Python.
Set to a UUID by default.
Source
metadata
metadata:
T
Source
relationships
relationships:
Partial
<Record
<NodeRelationship
,RelatedNodeType
<T
>>> ={}
Source
Accessors
childNodes
get
childNodes():undefined
|RelatedNodeInfo
<T
>[]
Returns
undefined
| RelatedNodeInfo
<T
>[]
Source
nextNode
get
nextNode():undefined
|RelatedNodeInfo
<T
>
Returns
undefined
| RelatedNodeInfo
<T
>
Source
parentNode
get
parentNode():undefined
|RelatedNodeInfo
<T
>
Returns
undefined
| RelatedNodeInfo
<T
>
Source
prevNode
get
prevNode():undefined
|RelatedNodeInfo
<T
>
Returns
undefined
| RelatedNodeInfo
<T
>
Source
sourceNode
get
sourceNode():undefined
|RelatedNodeInfo
<T
>
Returns
undefined
| RelatedNodeInfo
<T
>
Source
Methods
asRelatedNodeInfo()
asRelatedNodeInfo():
RelatedNodeInfo
<T
>
Returns
Source
clone()
Returns
Source
generateHash()
abstract
generateHash():string
Returns
string
Source
getContent()
abstract
getContent(metadataMode
):string
Parameters
• metadataMode: MetadataMode
Returns
string
Source
getEmbedding()
getEmbedding():
number
[]
Returns
number
[]