3 writes to Key
Aspire.Azure.AI.OpenAI (1)
AzureOpenAISettings.cs (1)
110
Key
= connectionBuilder[ConnectionStringKey].ToString();
Aspire.Azure.AI.OpenAI.Tests (2)
AspireAzureAIOpenAIExtensionsTests.cs (2)
93
builder.AddKeyedAzureOpenAIClient("openai", settings => { settings.Endpoint = uri; settings.
Key
= key; });
97
builder.AddAzureOpenAIClient("openai", settings => { settings.Endpoint = uri; settings.
Key
= key; });
5 references to Key
Aspire.Azure.AI.OpenAI (5)
AspireAzureOpenAIExtensions.cs (3)
93
throw new InvalidOperationException($"An OpenAIClient could not be configured. Ensure valid connection information was provided in 'ConnectionStrings:{connectionName}' or specify a '{nameof(AzureOpenAISettings.Endpoint)}' or '{nameof(AzureOpenAISettings.
Key
)}' in the '{configurationSectionName}' configuration section.");
99
if (!string.IsNullOrEmpty(settings.
Key
))
101
var credential = new ApiKeyCredential(settings.
Key
);
AzureOpenAISettings.cs (2)
27
/// Leave empty and provide a <see cref="
Key
"/> value to use a non-Azure OpenAI inference endpoint.
28
/// Used along with <see cref="Credential"/> or <see cref="
Key
"/> to establish the connection.