Partager via


AzureOpenAIExtensions.AddAzureOpenAI Method

Definition

Overloads

AddAzureOpenAI(IDistributedApplicationBuilder, String)

Adds an Azure OpenAI resource to the application model.

AddAzureOpenAI(IDistributedApplicationBuilder, String, Action<IResourceBuilder<AzureOpenAIResource>, ResourceModuleConstruct,CognitiveServicesAccount,IEnumerable<CognitiveServicesAccountDeployment>>)

Adds an Azure OpenAI resource to the application model.

AddAzureOpenAI(IDistributedApplicationBuilder, String)

Source:
AzureOpenAIExtensions.cs
Source:
AzureOpenAIExtensions.cs

Adds an Azure OpenAI resource to the application model.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.AzureOpenAIResource> AddAzureOpenAI (this Aspire.Hosting.IDistributedApplicationBuilder builder, string name);
static member AddAzureOpenAI : Aspire.Hosting.IDistributedApplicationBuilder * string -> Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.AzureOpenAIResource>
<Extension()>
Public Function AddAzureOpenAI (builder As IDistributedApplicationBuilder, name As String) As IResourceBuilder(Of AzureOpenAIResource)

Parameters

name
String

The name of the resource. This name will be used as the connection string name when referenced in a dependency.

Returns

A reference to the IResourceBuilder<T>.

Applies to

AddAzureOpenAI(IDistributedApplicationBuilder, String, Action<IResourceBuilder<AzureOpenAIResource>, ResourceModuleConstruct,CognitiveServicesAccount,IEnumerable<CognitiveServicesAccountDeployment>>)

Source:
AzureOpenAIExtensions.cs

Adds an Azure OpenAI resource to the application model.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.AzureOpenAIResource> AddAzureOpenAI (this Aspire.Hosting.IDistributedApplicationBuilder builder, string name, Action<Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.AzureOpenAIResource>,Aspire.Hosting.ResourceModuleConstruct,Azure.Provisioning.CognitiveServices.CognitiveServicesAccount,System.Collections.Generic.IEnumerable<Azure.Provisioning.CognitiveServices.CognitiveServicesAccountDeployment>>? configureResource);
static member AddAzureOpenAI : Aspire.Hosting.IDistributedApplicationBuilder * string * Action<Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.AzureOpenAIResource>, Aspire.Hosting.ResourceModuleConstruct, Azure.Provisioning.CognitiveServices.CognitiveServicesAccount, seq<Azure.Provisioning.CognitiveServices.CognitiveServicesAccountDeployment>> -> Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.AzureOpenAIResource>
<Extension()>
Public Function AddAzureOpenAI (builder As IDistributedApplicationBuilder, name As String, configureResource As Action(Of IResourceBuilder(Of AzureOpenAIResource), ResourceModuleConstruct, CognitiveServicesAccount, IEnumerable(Of CognitiveServicesAccountDeployment))) As IResourceBuilder(Of AzureOpenAIResource)

Parameters

name
String

The name of the resource. This name will be used as the connection string name when referenced in a dependency.

Returns

A reference to the IResourceBuilder<T>.

Applies to