Extraction from Text File issues:
File Location is empty
File Created is correct
File Content is empty
As a result, when I ask the chatbot the answer to the question, it is unable to answer it because whereas the collection is created and their is metadata, there is no content embedded (which contains the answer to the question).
The issue seems to be with the node “Prepare Embedding Document”
When I look at the node the Javascript for File Contents {{ json.text }} is red (which I presume explains the content not being pushed to qdrant)
The javascript for File Location {{ [$json.directory, $json.fileName].join(‘/’) }} is green but it is not pushing the correct data to qdrant (it pushes “## file location\n/\n” (which as you can see is not correct).
Note I have edited the workflow to use my own local files, credentials and changed the extract from file type to be text instead of pdf.
What is the error message (if any)?
Trying to push data to qdrant after extracting from a text file is not working.
Please share your workflow
Share the output returned by the last node
[
{
"data":
"This is a test document - the answer to the question is 5.\n"
}
]
I fixed the first issue of the file contents not being pushed - the javascript expression was not referencing the data object output form the previous node.
Now the content is being pushed to 'Prepare Embedding Document" node correctly and is making it into qdrant (and boy is that cool).
And I am guessing that the reason the file location is not being parsed is because it is also not using the correct expression (I see $json.directory in the variables node but there is no fileName variable set).
I am not sure this is the correct answer to your question, but the file name is on the binary property, so you should be able to get the fileName with this {{ $binary.data.fileName }}