Swift Examples - Azure Swift Client Examples

How to use OpenAI through an Azure deployment

You can use all of the OpenAI snippets with one change. Initialize the OpenAI service with:

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")
)