Find answers from the community

Updated 6 months ago

Simple question, but can’t find the

At a glance

A community member is asking how to access the text of the first node retrieved, but they are encountering an error that the object is not subscriptable. Another community member responds that the suggested approach worked for them, and a third community member asks which version of llamaindex the original poster is using. There is no explicitly marked answer in the comments.

Simple question, but can’t find the answer, how do I access the text of the first node retrieved? Something like
response.source_nodes[0].node.text
but this gives error "object is not subscriptable"
W
d
2 comments
Worked for me though 🤔
Attachment
image.png
@Stéphane Which version of llamaindex are you using?
Add a reply
Sign up and join the conversation on Discord