Skip to content

Commit

Permalink
Update llm_configuration.ipynb
Browse files Browse the repository at this point in the history
  • Loading branch information
prithvi2226 committed Jul 6, 2024
1 parent e2efe2a commit 0772fb9
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions website/docs/topics/llm_configuration.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -302,28 +302,37 @@
"Azure Active Directory (AAD) provides secure access to resources and applications. Follow the steps below to configure AAD authentication for Autogen.\n",
"\n",
"#### Prerequisites\n",
"- An Azure account with AAD configured.\n",
"- An Azure subscription - [Create one for free](https://azure.microsoft.com/en-us/free/).\n",
"- Access granted to the Azure OpenAI Service in the desired Azure subscription.\n",
"- Appropriate permissions to register an application in AAD.\n",
"- Custom subdomain names are required to enable features like Microsoft Entra ID for authentication.\n",
"- Azure CLI - [Installation Guide](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli).\n",
"\n",
"For more detailed and up-to-date instructions, please refer to the official [Azure OpenAI documentation](https://learn.microsoft.com/en-us/azure/ai-services/openai/).\n",
"\n",
"#### Step 1: Register an Application in AAD\n",
"1. Navigate to the [Azure portal](https://portal.azure.com/).\n",
"1. Navigate to the [Azure portal](https://azure.microsoft.com/en-us/get-started/azure-portal).\n",
"2. Go to `Azure Active Directory` > `App registrations`.\n",
"3. Click on `New registration`.\n",
"4. Enter a name for your application.\n",
"5. Set the `Redirect URI` (optional).\n",
"6. Click `Register`.\n",
"\n",
"For detailed instructions, refer to the official [Azure AD Quickstart documentation](https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app?tabs=certificate).\n",
"\n",
"#### Step 2: Configure API Permissions\n",
"1. After registration, go to `API permissions`.\n",
"2. Click `Add a permission`.\n",
"3. Select `Microsoft Graph` and then `Delegated permissions`.\n",
"4. Add the necessary permissions (e.g., `User.Read`).\n",
"\n",
"For more details, see [API permissions in Microsoft Graph](https://learn.microsoft.com/en-us/entra/identity-platform/permissions-consent-overview)\n",
"\n",
"#### Step 3: Obtain Client ID and Tenant ID\n",
"1. Go to `Overview` of your registered application.\n",
"2. Note down the `Application (client) ID` and `Directory (tenant) ID`.\n",
"\n",
"Note: For the first 3 steps, For detailed and up-to-date instructions, please refer to the official [Azure OpenAI documentation](https://learn.microsoft.com/en-us/azure/ai-services/openai/).\n",
"For more details, visit [Register an application with the Microsoft identity platform](https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app?tabs=certificate)\n",
"\n",
"#### Step 4: Configure Your Application\n",
"Use the obtained `Client ID` and `Tenant ID` in your application configuration. Here’s an example of how to do this in your configuration file:\n",
Expand Down Expand Up @@ -355,6 +364,9 @@
" print(\"Error acquiring token:\", result.get(\"error\"))\n",
"```\n",
"\n",
"For more details, refer to the [Authenticate and authorize in Azure OpenAI Service](https://learn.microsoft.com/en-us/azure/api-management/api-management-authenticate-authorize-azure-openai) and [How to configure Azure OpenAI Service with Microsoft Entra ID authentication](https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/managed-identity).\n",
"\n",
"\n",
"#### Step 6: Configure Azure OpenAI with AAD Auth in AutoGen\n",
"To use AAD authentication with Azure OpenAI in AutoGen, configure the `llm_config` with the necessary parameters.\n",
"\n",
Expand All @@ -375,6 +387,8 @@
"}\n",
"```\n",
"\n",
"For more details, refer to the [Authenticate and authorize in Azure OpenAI Service](https://learn.microsoft.com/en-us/azure/api-management/api-management-authenticate-authorize-azure-openai) and [How to configure Azure OpenAI Service with Microsoft Entra ID authentication](https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/managed-identity).\n",
"\n",
"In this configuration:\n",
"- `model`: The Azure OpenAI deployment name.\n",
"- `base_url`: The base URL of the Azure OpenAI endpoint.\n",
Expand Down

0 comments on commit 0772fb9

Please sign in to comment.