Azure OpenAI
Integrate Azure OpenAI with Agency Swarm to ensure secure data processing and enhanced privacy.
Many organizations prioritize data privacy and are cautious about sharing their data with any third-parties. By leveraging Azure OpenAI, you can ensure that your data is processed only within your own secure Azure environment, and not even shared with OpenAI itself.
Running OpenAI models on Azure is the same as deploying your own open source model on any other cloud provider.
Prerequisites
Before you begin, ensure you have the following:
- Create an Azure Account with an active subscription. Create an account here.
- Get approved access to the OpenAI Service on Azure.
- Create an Azure OpenAI resource in one of the available regions and deploy a model to it.
- Obtain the endpoint URL and API key for the OpenAI resource.
Setting Up Azure OpenAI with Agency Swarm
Configure the Azure OpenAI Client
To use Azure OpenAI, you need to replace the default OpenAI client with the configured AzureOpenAI
client:
Update Agent Model Parameters
Replace the model
parameter inside each agent with your model deployment name from Azure.t:
Model deployment name might be different from the stadard OpenAI model names. It is set by you when you deploy a model to Azure.
Run Your Agency
After configuring the client and updating the agents, you can run your agency as usual:
Example Notebook
For an example of using Azure OpenAI with Agency Swarm, refer to the Azure OpenAI Notebook in the notebooks folder.