OnnxKernelBuilderExtensions.AddOnnxRuntimeGenAIChatCompletion 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.
Add OnnxRuntimeGenAI Chat Completion services to the kernel builder.
public static Microsoft.SemanticKernel.IKernelBuilder AddOnnxRuntimeGenAIChatCompletion(this Microsoft.SemanticKernel.IKernelBuilder builder, string modelId, string modelPath, string? serviceId = default, System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = default);
static member AddOnnxRuntimeGenAIChatCompletion : Microsoft.SemanticKernel.IKernelBuilder * string * string * string * System.Text.Json.JsonSerializerOptions -> Microsoft.SemanticKernel.IKernelBuilder
<Extension()>
Public Function AddOnnxRuntimeGenAIChatCompletion (builder As IKernelBuilder, modelId As String, modelPath As String, Optional serviceId As String = Nothing, Optional jsonSerializerOptions As JsonSerializerOptions = Nothing) As IKernelBuilder
Parameters
- builder
- IKernelBuilder
The kernel builder.
- modelId
- String
Model Id.
- modelPath
- String
The generative AI ONNX model path.
- serviceId
- String
The optional service ID.
- jsonSerializerOptions
- JsonSerializerOptions
The JsonSerializerOptions to use for various aspects of serialization, such as function argument deserialization, function result serialization, logging, etc., of the service.
Returns
The updated kernel builder.