English | Chinese
Most OpenAI clients do not support Azure OpenAI Service, but the application and card binding of Azure OpenAI Service are very simple, and there is also a free credit limit. This script uses the free Cloudflare Worker as a proxy, allowing OpenAI-enabled clients to use Azure OpenAI Service directly.
Adding model subclasses is very easy, refer to the following instructions for use
Proxy OpenAI requests to Azure OpenAI Service, code deployment steps:
First get resourceName and deployment mapper, and log in to Azure's background:

// The name of your Azure OpenAI Resource.
const resourceName = "codegpt"
// deployment model mapper
const mapper = {
'gpt-3.5-turbo' : 'gpt3' ,
'gpt-4' : 'gpt4' ,
'dall-e-3' : 'dalle3'
} ;
其他的map规则直接按这样的格式续写即可Or through the cloudflare worker console, go to Workers script > Settings > Add variable under Environment Variables.

Taking OpenCat as an example: Custom API domain name filling in the domain name bound in the sixth step:

I have tried multiple clients, and if I encounter problems with other clients, I welcome to create an issue.