Skip to content

Commit

Permalink
Update AI subscription key endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
heblasco committed Mar 6, 2024
1 parent 569d802 commit d8a86f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/AIHub/Controllers/ImageAnalyzerController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public async Task<IActionResult> DenseCaptionImage(string image_url, string prom
if (string.IsNullOrEmpty(AOAIsubscriptionKey))
{
var credential = new DefaultAzureCredential();
httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", credential.GetToken(new TokenRequestContext(["https://api.openai.com/.default"])).Token);
httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", credential.GetToken(new TokenRequestContext(["https://cognitiveservices.azure.com/.default"])).Token);
}
else
{
Expand Down

0 comments on commit d8a86f2

Please sign in to comment.