Skip to content

Commit 3c334e7

Browse files
authored
Added .default scope to URI to get token using DefaultAzureCredential
Fixing issue encountered when using this in some contexts (like virtual environments in notebooks).
1 parent e3395df commit 3c334e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/azure/finetuning.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"from azure.identity import DefaultAzureCredential\n",
5959
"\n",
6060
"default_credential = DefaultAzureCredential()\n",
61-
"token = default_credential.get_token(\"https://cognitiveservices.azure.com\")\n",
61+
"token = default_credential.get_token(\"https://cognitiveservices.azure.com/.default\")\n",
6262
"\n",
6363
"openai.api_type = 'azure_ad'\n",
6464
"openai.api_key = token.token\n",

0 commit comments

Comments
 (0)