Open trrwilson opened 1 year ago
@trrwilson, can this be closed now that we have the new ClientModel APIs for this?
Dropping this incase anyone else is trying to figure out how to register this with the ClientModel APIs
builder.Services.AddAzureClients(azBuilder =>
{
azBuilder.AddClient<OpenAIClient, OpenAIClientOptions>(options =>
new OpenAIClient(builder.Configuration.GetValue<string>("MY_OPEN_AI_KEY"), options));
});
PR #35045 added the capability to use
Azure.AI.OpenAI
'sOpenAIClient
to connect to the non-Azure OpenAI endpoint using an API key from https://platform.openai.com.This is currently represented as a plain string, but needs to be updated to a strongly-typed credential object that derives from
TokenCredential
and mirrors the functionality ofAzureKeyCredential
.Additionally, when adding this new type:
AddOpenAIClient()
) should be added