Class: ImageNode<T>
TextNode is the default node type for text. Most common node type in LlamaIndex.TS
Extends
TextNode
<T
>
Extended by
Type parameters
• T extends Metadata
= Metadata
Constructors
new ImageNode()
new ImageNode<
T
>(init
):ImageNode
<T
>
Parameters
• init: ImageNodeParams
<T
>
Returns
ImageNode
<T
>
Overrides
Source
packages/llamaindex/src/Node.ts:354
Properties
embedding?
optional
embedding:number
[]
Inherited from
Source
packages/llamaindex/src/Node.ts:61
endCharIdx?
optional
endCharIdx:number
Inherited from
Source
packages/llamaindex/src/Node.ts:214
excludedEmbedMetadataKeys
excludedEmbedMetadataKeys:
string
[]
Inherited from
TextNode
. excludedEmbedMetadataKeys
Source
packages/llamaindex/src/Node.ts:65
excludedLlmMetadataKeys
excludedLlmMetadataKeys:
string
[]
Inherited from
TextNode
. excludedLlmMetadataKeys
Source
packages/llamaindex/src/Node.ts:66
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.
Inherited from
Source
packages/llamaindex/src/Node.ts:60
image
image:
ImageType
Source
packages/llamaindex/src/Node.ts:352
metadata
metadata:
T
Inherited from
Source
packages/llamaindex/src/Node.ts:64
metadataSeparator
metadataSeparator:
string
Inherited from
Source
packages/llamaindex/src/Node.ts:217
relationships
relationships:
Partial
<Record
<NodeRelationship
,RelatedNodeType
<T
>>>
Inherited from
Source
packages/llamaindex/src/Node.ts:67
startCharIdx?
optional
startCharIdx:number
Inherited from
Source
packages/llamaindex/src/Node.ts:213
text
text:
string
Inherited from
Source
packages/llamaindex/src/Node.ts:210
textTemplate
textTemplate:
string
Inherited from
Source
packages/llamaindex/src/Node.ts:211
Accessors
childNodes
get
childNodes():undefined
|RelatedNodeInfo
<T
>[]
Returns
undefined
| RelatedNodeInfo
<T
>[]
Source
packages/llamaindex/src/Node.ts:139
hash
nextNode
get
nextNode():undefined
|RelatedNodeInfo
<T
>
Returns
undefined
| RelatedNodeInfo
<T
>
Source
packages/llamaindex/src/Node.ts:119
parentNode
get
parentNode():undefined
|RelatedNodeInfo
<T
>
Returns
undefined
| RelatedNodeInfo
<T
>
Source
packages/llamaindex/src/Node.ts:129
prevNode
get
prevNode():undefined
|RelatedNodeInfo
<T
>
Returns
undefined
| RelatedNodeInfo
<T
>
Source
packages/llamaindex/src/Node.ts:107
sourceNode
get
sourceNode():undefined
|RelatedNodeInfo
<T
>
Returns
undefined
| RelatedNodeInfo
<T
>
Source
packages/llamaindex/src/Node.ts:97
type
get
type():ObjectType
Returns
Source
packages/llamaindex/src/Node.ts:360
Methods
asRelatedNodeInfo()
asRelatedNodeInfo():
RelatedNodeInfo
<T
>
Returns
Inherited from
Source
packages/llamaindex/src/Node.ts:161
clone()
Returns
Inherited from
Source
packages/llamaindex/src/Node.ts:183
generateHash()
generateHash():
string
Generate a hash of the text node. The ID is not part of the hash as it can change independent of content.
Returns
string
Overrides
Source
packages/llamaindex/src/Node.ts:392
generateImageHash()
private
generateImageHash():string
Returns
string
Source
packages/llamaindex/src/Node.ts:371
getContent()
getContent(
metadataMode
):string
Parameters
• metadataMode: MetadataMode
= MetadataMode.NONE
Returns
string
Inherited from
Source
packages/llamaindex/src/Node.ts:252
getEmbedding()
getEmbedding():
number
[]
Returns
number
[]