TMSFNCCloudAI.files by FileID

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,

We could see this issue and have applied an improvement for this.
The next update of TMS FNC Cloud Pack will have this improvement.