Log in
Log into community
Find answers from the community
View all posts
Related posts
Did this answer your question?
π
π
π
Powered by
Hall
Inactive
Updated 8 months ago
0
Follow
π I'm hearing there's some odd
π I'm hearing there's some odd
Inactive
0
Follow
M
Mr Pebble
8 months ago
Β·
π I'm hearing there's some odd restructuring of Document in the later patches. Are these all going to be subclassed off of Document or are they just all different now?
L
M
14 comments
Share
Open in Discord
L
Logan M
8 months ago
Not sure what you mean?
L
Logan M
8 months ago
The base object is
BaseNode
L
Logan M
8 months ago
TextNode
and
Document
are extensions of this
M
Mr Pebble
8 months ago
Okay, so ImageDocument then is a BaseNode and not a Document?
M
Mr Pebble
8 months ago
Thanks Logan, I appreciate the time.
L
Logan M
8 months ago
ImageDocument
extends
Document
, and just adds an image field and some helper method
M
Mr Pebble
8 months ago
Okay, so it does extend. I'll wag finger at my dev.
M
Mr Pebble
8 months ago
I'm guessing they just aren't familiar with inheritance advantages.
L
Logan M
8 months ago
You can check out these class defintions in the source code here too:
https://github.com/run-llama/llama_index/blob/main/llama-index-core/llama_index/core/schema.py
L
Logan M
8 months ago
For the most part, a node and a document are the same object, its mostly about what they represent
M
Mr Pebble
8 months ago
We're going to be doing something cool with your stuff. Will share when it's done.
M
Mr Pebble
8 months ago
Is there a source of notifications on code changes so I can keep better apprised?
M
Mr Pebble
8 months ago
git I guess.. π
L
Logan M
8 months ago
heh yes -- in general though, these very core abstractions are pretty insulated from changes.
I changed the node class once and it was a nightmare haha would like to avoid this in the future π
Add a reply
Sign up and join the conversation on Discord
Join on Discord