Find answers from the community

s
F
Y
a
P
Updated 2 years ago

Is there a way to modify `response get

Is there a way to modify response.get_formatted_sources() to produce the name of the source file rather than a meaningless doc id like Doc id: 3e176859?
j
m
M
4 comments
you can directly parse the source_nodes which contain the objects (containing the text chunk, the doc id which you can then use to look up the file name)
btw you can set the doc_id directly before you feed into an index document.doc_id = "foo" - otherwise we just generate a random number
I'm curious why the SimpleDirectoryReader does not save the filenames?
Add a reply
Sign up and join the conversation on Discord