Hello,
I’m currently testing the TTMSFNCCloudAI
component. Everything works fine in asynchronous mode using the OnExecute
event. However, I need a way to identify the caller when Execute
is used in a non-modal context.
I noticed the Execute
method has an optional id: string
parameter:
function TTMSFNCCloudAI.Execute(id: string = ''): boolean;
begin
FToolsCall := '';
FToolsResponse := '';
Result := ExecuteHistory;
end;
This suggests it should be possible to associate a custom ID with a request and retrieve it later from the AResponse.Id
field in the OnExecute
event.
Unfortunately, AResponse.Id
is always empty, even when a custom ID is passed to Execute
.
It seems the id
parameter is not currently stored or used internally by the component, which makes it impossible to track which request triggered the response.
Could you confirm if this is the expected behavior or if it’s a missing implementation?
If not supported yet, is there a recommended workaround to associate request metadata (like an identifier) with the response in asynchronous calls?
Best regards,