Hello,
According the documentation, Azure requires some modifications to send requests to the OpenAI API. I've added a couple of new properties to set the required parameters. Set first the provider to Azure (by default is set to OpenAI) and then fill the ResourceName and DeplymentId with your own values:
TsgcHTTP_API_OpenAI.OpenAIOptions.Provider := oapvAzure;
TsgcHTTP_API_OpenAI.OpenAIOptions.AzureOptions.ResourceName := '<your resource name>';
TsgcHTTP_API_OpenAI.OpenAIOptions.AzureOptions.DeploymentId := '<your deployment id>';
You can download the latest beta which includes these new properties. I've requested access to the Microsoft's Azure OpenAI Service, so I still can not test if this works or not, feel free to test with your account and let me know if works.
Kind Regards,
Sergio