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.
OpenAI := TsgcHTTP_API_OpenAI.Create(nil); OpenAI.OpenAIOptions.Provider := oapvAzure; OpenAI.OpenAIOptions.AzureOptions.ResourceName := '<your resource name>'; OpenAI.OpenAIOptions.AzureOptions.DeploymentId := '<your deployment id>'; OpenAI._CreateChatCompletion('', 'How are you?');
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.
When you subscribe to the blog, we will send you an e-mail when there are new updates on the site so you wouldn't miss them.