lzell / AIProxySwift

Client for AIProxy
https://www.aiproxy.pro
73 stars 9 forks source link

Add support for Azure deployments #41

Closed lzell closed 2 months ago

lzell commented 2 months ago

How to use OpenAI through an Azure deployment

You can use all of the OpenAI snippets in this project's README 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")
)