GitHubModelsExtensions.AddGitHubModel Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| AddGitHubModel(IDistributedApplicationBuilder, String, GitHubModel, IResourceBuilder<ParameterResource>) |
Adds a GitHub Model resource to the application model using a GitHubModel. |
| AddGitHubModel(IDistributedApplicationBuilder, String, String, IResourceBuilder<ParameterResource>) |
Adds a GitHub Model resource to the application model. |
AddGitHubModel(IDistributedApplicationBuilder, String, GitHubModel, IResourceBuilder<ParameterResource>)
- Source:
- GitHubModelsExtensions.cs
Adds a GitHub Model resource to the application model using a GitHubModel.
public static Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.GitHub.Models.GitHubModelResource> AddGitHubModel(this Aspire.Hosting.IDistributedApplicationBuilder builder, string name, Aspire.Hosting.GitHub.GitHubModel model, Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.ParameterResource>? organization = default);
static member AddGitHubModel : Aspire.Hosting.IDistributedApplicationBuilder * string * Aspire.Hosting.GitHub.GitHubModel * Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.ParameterResource> -> Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.GitHub.Models.GitHubModelResource>
<Extension()>
Public Function AddGitHubModel (builder As IDistributedApplicationBuilder, name As String, model As GitHubModel, Optional organization As IResourceBuilder(Of ParameterResource) = Nothing) As IResourceBuilder(Of GitHubModelResource)
Parameters
- name
- String
The name of the resource. This name will be used as the connection string name when referenced in a dependency.
- model
- GitHubModel
The model descriptor, using the GitHubModel class like so: builder.AddGitHubModel(name: "chat", model: GitHubModel.Microsoft.Phi3MediumInstruct)
- organization
- IResourceBuilder<ParameterResource>
The organization login associated with the organization to which the request is to be attributed.
Returns
A reference to the IResourceBuilder<T>.
Remarks
var builder = DistributedApplication.CreateBuilder(args);
var githubModel = builder.AddGitHubModel("chat", GitHubModel.Microsoft.Phi3MediumInstruct);
Applies to
AddGitHubModel(IDistributedApplicationBuilder, String, String, IResourceBuilder<ParameterResource>)
- Source:
- GitHubModelsExtensions.cs
- Source:
- GitHubModelsExtensions.cs
Adds a GitHub Model resource to the application model.
public static Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.GitHub.Models.GitHubModelResource> AddGitHubModel(this Aspire.Hosting.IDistributedApplicationBuilder builder, string name, string model, Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.ParameterResource>? organization = default);
static member AddGitHubModel : Aspire.Hosting.IDistributedApplicationBuilder * string * string * Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.ParameterResource> -> Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.GitHub.Models.GitHubModelResource>
<Extension()>
Public Function AddGitHubModel (builder As IDistributedApplicationBuilder, name As String, model As String, Optional organization As IResourceBuilder(Of ParameterResource) = Nothing) As IResourceBuilder(Of GitHubModelResource)
Parameters
- name
- String
The name of the resource. This name will be used as the connection string name when referenced in a dependency.
- model
- String
The model name to use with GitHub Models.
- organization
- IResourceBuilder<ParameterResource>
The organization login associated with the organization to which the request is to be attributed.
Returns
A reference to the IResourceBuilder<T>.