Hello,
I’m trying to ask an AI a question using a previously uploaded file by referencing its file-id. To do this, I modified your UaiFiles.dpr demo to only use the selected item from the ListView:
TMSFNCCloudAI1.Files.Clear;
LTTMSFNCCloudAIFile:=TMSFNCCloudAI1.Files.Add;
LTTMSFNCCloudAIFile.ID:= ListView1.Items[ ListView1.Selected.Index ].Caption;
LTTMSFNCCloudAIFile.FileType:= aiftImage;
TMSFNCCloudAI1.Execute;
Issue:
This works fine with OpenAI for file types like aiftImage, aiftPDF, aiftExcel, or aiftWord, but not for aiftText.
Looking at your source code, I noticed there’s no explicit check for FileID in case of aiftText :
if (FFiles[i].ID <> '') then
Question:
Why can’t we send Files[i].ID for (Clouded) text files? In other words, why doesn’t RAG work for text files?
Thanks,