An async thread-safe singleton for the Azure OpenAI client
$ dotnet add package Soenneker.Azure.OpenAI.Client
Soenneker.Azure.OpenAI.Clientdotnet add package Soenneker.Azure.OpenAI.Client
Register:
builder.services.AddAzureOpenAIClientUtilAsSingleton();
IConfiguration values:
"Azure:OpenAI:Deployment"
"Azure:OpenAI:ApiKey"
"Azure:OpenAI:Uri"