By Admin on Tuesday, 15 August 2023
Category: All

Azure OpenAI Service for Rad Studio

​From sgcWebSockets 2023.7.0 the Microsoft Azure OpenAI Service is supported. 

Azure OpenAI Service can be used to create chatbots, generate text, translate languages, and write different kinds of creative content. As the platform continues to evolve, developers will be able to use it to build even more powerful and sophisticated applications.

The difference between OpenAI and Azure OpenAI is that the latest offers advanced language AI with OpenAI models while providing the security and enterprise promise of Azure. It is co-developed by Microsoft and OpenAI, ensuring compatibility and a smooth transition between the two.

Configuration

The client supports Microsoft Azure OpenAI Services, so you can use your Azure account to interactuate with the Azure OpenAI API too. In order to configure the client to work with Azure, follow the next steps:

1. Configure the property OpenAIOptions.Provider = oapvAzure
2. Set the values of ResourceName and DeploymentId (these values can be located in your Azure Account)

  a. OpenAIOptions.AzureOptions.ResourceName = <your resource name>.
  b. OpenAIOptions.AzureOptions.DeploymentId = <your deployment id>.

3. Set the API Key of your Azure Account

  a. OpenAIOptions.ApiKey = <azure api key>.

Keep in mind that not all the OpenAI methods are supported by Azure, currently only the following methods are supported:

Azure OpenAI Delphi Demo

​Find below a demo built with the sgcWebSockets library showing the main features of OpenAI API. Can be tested using the OpenAI API directly or the Azure OpenAI Service. The demo is compiled with Delphi for Windows.

Related Posts