CopilotKit can also run with Azure OpenAI as a backend.

Applying for Azure OpenAI

If you are using Azure OpenAI for the first time, you need to fill out a form and apply. Go to the Azure Portal and search for OpenAI. You will get a link to the “Request Access to Azure OpenAI Service” form. Fill out the form and wait a day or two for the approval.

Create the resource

First, you need to create a new Azure OpenAI resource.

Take note of the instance name, we will use this when setting up the runtime in code.

Next, enable access from all networks.

Add the tags you want and click “Create”.

Select Resource Management > Model Deployment and click “Manage Deployments”

Click Deployments > Create New Deployment

Fill out the form for the model. Take note of the name you give to the model, we will user it later.

Verify your deployment was created.

The model will not be available immediately, but you will have to wait up to 10 min.

If you get this error in the Chat sandbox, the model is not ready yet:

Once you got everything set up, you can now connect to OpenAI through Azure: