Use your Azure credits

September 18, 2024 by Lou Zell

AIProxy is now compatible with Azure OpenAI deployments. This is handy if you are part of Microsoft's Startup program and have Azure credits. You can now put those credits towards OpenAI functionality in your app. You can apply for startup credits here.

To use Azure's flavor of chat completions in your app, you'll need AIProxySwift version 0.21.0 or later. There is a new argument that you pass to the initializer of your `openAIService`, called `requestFormat`:

import AIProxy

let openAIService = AIProxy.openAIService(
    partialKey: "partial-key-from-your-developer-dashboard",
    serviceURL: "service-url-from-your-developer-dashboard",
    requestFormat: .azureDeployment(apiVersion: "2024-06-01")
)

Configure the service in the AIProxy dashboard by Services > Add New Service > and specify your Azure OpenAI deployment's URL as the proxy domain. If you need a hand, please reach out to us using the blue intercom button in the bottom right of this page.