Freigeben über


OnnxServiceCollectionExtensions.AddOnnxRuntimeGenAIChatCompletion Method

Definition

Add OnnxRuntimeGenAI Chat Completion services to the specified service collection.

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddOnnxRuntimeGenAIChatCompletion (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string modelId, string modelPath, string? serviceId = default);
static member AddOnnxRuntimeGenAIChatCompletion : Microsoft.Extensions.DependencyInjection.IServiceCollection * string * string * string -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddOnnxRuntimeGenAIChatCompletion (services As IServiceCollection, modelId As String, modelPath As String, Optional serviceId As String = Nothing) As IServiceCollection

Parameters

services
IServiceCollection

The service collection to add the OnnxRuntimeGenAI Text Generation service to.

modelId
String

The name of the model.

modelPath
String

The generative AI ONNX model path.

serviceId
String

Optional service ID.

Returns

The updated service collection.

Applies to