Class: Document<T>
A document is just a special text node with a docId.
Extends
TextNode
<T
>
Type parameters
• T extends Metadata
= Metadata
Constructors
new Document()
new Document<
T
>(init
?):Document
<T
>
Parameters
• init?: TextNodeParams
<T
>
Returns
Document
<T
>
Overrides
Source
packages/core/dist/schema/index.d.ts:129
Properties
embedding?
optional
embedding:number
[]
Inherited from
Source
packages/core/dist/schema/index.d.ts:51
endCharIdx?
optional
endCharIdx:number
Inherited from
Source
packages/core/dist/schema/index.d.ts:98
excludedEmbedMetadataKeys
excludedEmbedMetadataKeys:
string
[]
Inherited from
TextNode
. excludedEmbedMetadataKeys
Source
packages/core/dist/schema/index.d.ts:53
excludedLlmMetadataKeys
excludedLlmMetadataKeys:
string
[]
Inherited from
TextNode
. excludedLlmMetadataKeys
Source
packages/core/dist/schema/index.d.ts:54
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/core/dist/schema/index.d.ts:50
metadata
metadata:
T
Inherited from
Source
packages/core/dist/schema/index.d.ts:52
metadataSeparator
metadataSeparator:
string
Inherited from
Source
packages/core/dist/schema/index.d.ts:99
relationships
relationships:
Partial
<Record
<NodeRelationship
,RelatedNodeType
<T
>>>
Inherited from
Source
packages/core/dist/schema/index.d.ts:55
startCharIdx?
optional
startCharIdx:number
Inherited from
Source
packages/core/dist/schema/index.d.ts:97
text
text:
string
Inherited from
Source
packages/core/dist/schema/index.d.ts:95
textTemplate
textTemplate:
string
Inherited from
Source
packages/core/dist/schema/index.d.ts:96
Accessors
childNodes
get
childNodes():undefined
|RelatedNodeInfo
<T
>[]
Returns
undefined
| RelatedNodeInfo
<T
>[]
Source
packages/core/dist/schema/index.d.ts:66
hash
nextNode
get
nextNode():undefined
|RelatedNodeInfo
<T
>
Returns
undefined
| RelatedNodeInfo
<T
>
Source
packages/core/dist/schema/index.d.ts:64
parentNode
get
parentNode():undefined
|RelatedNodeInfo
<T
>
Returns
undefined
| RelatedNodeInfo
<T
>
Source
packages/core/dist/schema/index.d.ts:65
prevNode
get
prevNode():undefined
|RelatedNodeInfo
<T
>
Returns
undefined
| RelatedNodeInfo
<T
>
Source
packages/core/dist/schema/index.d.ts:63
sourceNode
get
sourceNode():undefined
|RelatedNodeInfo
<T
>
Returns
undefined
| RelatedNodeInfo
<T
>
Source
packages/core/dist/schema/index.d.ts:62
type
get
type():ObjectType
Returns
Source
packages/core/dist/schema/index.d.ts:130
Methods
asRelatedNodeInfo()
asRelatedNodeInfo():
RelatedNodeInfo
<T
>
Returns
Inherited from
Source
packages/core/dist/schema/index.d.ts:69