I am attempting to run the FMXFNCCloudAIDemo deployed to a macOS, but for any of the AI services I keep getting the same error message:
HTTP eddor code: 0
A server with the specified hostname could not be found
I have created and entered API keys for Gemini, Claude, Grok, OpenAI, Mistral and DeepSeek, but all of them produce the same error on a Mac
but, it works fine when deployed on a Windows.
I have tried stepping through the debugger, but cannot seem to find the issue. I have also tried deploying out to a mac with version 15.5 OS and still getting this issue.
I have the latest FNC cloud pack installed, version 3.5.0.0. and the lastest core installed.
has anyone got the TTMSFNCCloudAI component working on a Mac?
I have a feeling it has something to do with SSL dylib files or something, but I can't seem to figure it out.
We have been able to reproduce this and applied a patch.
Next version of the TMS FNC Cloud Pack will address this. It was related to incorrect defined paths.
Yes, I thought the same thing. I also tried adding the extra slashes in the paths, but that still doesn't fix the issue on a Mac. I am still getting the same error message that the hostname is not found?
I even tried this:
case Service of
aiOpenAI:
begin
//if Settings.OpenAIServers = oaDefault then
//ARequest.Host := cHostOpenAI_Default
//else
//ARequest.Host := cHostOpenAI_EU;
//ARequest.Path := cPathOpenAI;
ARequest.Host := 'https://api.openai.com';
ARequest.Path := '/v1/responses';
ARequest.AddHeader(cHeaderAuthorization, cHeaderAuthorizationValue + GetAPIKey);
end;
aiGemini:
what is even more strange, I created a very simple app with a memo and 2 buttons .. one button uses the TMSFNCCloudAI component like this:
We've tested the cloud ai component here, and couldn't see an issue after fixing the paths. We'll release an update this week, maybe you can try again after the update.
I wish I could get it working on a Mac. i tried uninstalling/re-installing the cloud components, applying the simple patch. I tried Delphi 11, and Delphi 12.3, I tried deploying to 2 different Mac computers, one is version 11.7.10 and the other version 15.5. no matter what I do, I always get that same message "A server with the specified hostname could not be found"
but it works fine on windows
is there anything else you can think of? I've already gone down the ChatGPT rabbit hole for 2 days with no luck lol, tried endless things
Ok, I was able to get your patch to finally work .. here is what I did, just in case someone else runs into this issue:
step 1: close Delphi 12.3
step 2: delete the "OSX64" folder from my project folder
step 3: made a copy of the FMX.TMSFNCCloudAI.pas file, applied the patch, and pasted that file into my project folder
step 4: start delphi, and deploy to mac .. and it now works
so .. things should be good once the new updates are released so I don't have to put the file in my project folder.