Find answers from the community

Updated 3 months ago

Anybody know how to let the

Anybody know how to let the GPTSimpleVectorIndex.query() returns not only the answer, but also the doc_id where the answer from? Thx
L
J
2 comments
It already does! :dotsHARDSTYLE:

response.source_nodes

which returns a list

response.source_nodes[0].node.ref_doc_id

Gets the ref doc id
Thank you so much!!
Add a reply
Sign up and join the conversation on Discord