Merge pull request #36 from achandmsft/patch-1

Added .default scope to URI to get token using DefaultAzureCredential
pull/42/head
Ted Sanders 2 years ago committed by GitHub
commit 7de3d50816
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -58,7 +58,7 @@
"from azure.identity import DefaultAzureCredential\n",
"\n",
"default_credential = DefaultAzureCredential()\n",
"token = default_credential.get_token(\"https://cognitiveservices.azure.com\")\n",
"token = default_credential.get_token(\"https://cognitiveservices.azure.com/.default\")\n",
"\n",
"openai.api_type = 'azure_ad'\n",
"openai.api_key = token.token\n",

Loading…
Cancel
Save