Hello,
I have problem with the TTMSFNCCloudAI component. I am using it for for communication with OpenAI Assistants Platform. Firstly, the OpenAI thread is created using the procedure TTMSFNCCloudAI.CreateThread(ACreated) and the thread ID is stored in the database. Then the message is posted within this thread. Next messages are posted within the thread with the threadID stored in the first step and everything works correct.
The problem appears when the application is closed and opened again. I would like to continue in the thread, which is stored in the database, but when I post the message using TTMSFNCCloudAI.CreateMessage() with threadID from the database, I get an error with the bad request url: Invalid URL (GET /v1/threads/runs/run_XXXXXXXXXXXXXXXXXXXXX). I think, that between threads and runs in the url the threadID is missing - should be GET /v1/threads/thread_XXXXXXXXXXXXXXXXXXXXX/runs/run_XXXXXXXXXXXXXXXXXXXXX.
When I tried to resolve this problem using debugger, I found, that you use the private FThreadID property in the procedure TTMSFNCCloudAI.CheckStatus(). This property you assign only in the procedure CreateThread(), so if I skip the CreateThread() step and use directly the threadID from the database, FThreadID is empty and URLs are wrong.
Can you look on this problem?
Thank you very much.
Josef Bambousek