Share via


OnnxKernelBuilderExtensions.AddBertOnnxTextEmbeddingGeneration Method

Definition

Overloads

AddBertOnnxTextEmbeddingGeneration(IKernelBuilder, Stream, Stream, BertOnnxOptions, String)

Adds a text embedding generation service using a BERT ONNX model.

AddBertOnnxTextEmbeddingGeneration(IKernelBuilder, String, String, BertOnnxOptions, String)

Adds a text embedding generation service using a BERT ONNX model.

AddBertOnnxTextEmbeddingGeneration(IKernelBuilder, Stream, Stream, BertOnnxOptions, String)

Adds a text embedding generation service using a BERT ONNX model.

public static Microsoft.SemanticKernel.IKernelBuilder AddBertOnnxTextEmbeddingGeneration (this Microsoft.SemanticKernel.IKernelBuilder builder, System.IO.Stream onnxModelStream, System.IO.Stream vocabStream, Microsoft.SemanticKernel.Connectors.Onnx.BertOnnxOptions? options = default, string? serviceId = default);
static member AddBertOnnxTextEmbeddingGeneration : Microsoft.SemanticKernel.IKernelBuilder * System.IO.Stream * System.IO.Stream * Microsoft.SemanticKernel.Connectors.Onnx.BertOnnxOptions * string -> Microsoft.SemanticKernel.IKernelBuilder
<Extension()>
Public Function AddBertOnnxTextEmbeddingGeneration (builder As IKernelBuilder, onnxModelStream As Stream, vocabStream As Stream, Optional options As BertOnnxOptions = Nothing, Optional serviceId As String = Nothing) As IKernelBuilder

Parameters

builder
IKernelBuilder

The IKernelBuilder instance to augment.

onnxModelStream
Stream

Stream containing the ONNX model. The stream will be read during this call and will not be used after this call's completion.

vocabStream
Stream

Stream containing the vocab file. The stream will be read during this call and will not be used after this call's completion.

options
BertOnnxOptions

Options for the configuration of the model and service.

serviceId
String

A local identifier for the given AI service.

Returns

The same instance as builder.

Applies to

AddBertOnnxTextEmbeddingGeneration(IKernelBuilder, String, String, BertOnnxOptions, String)

Adds a text embedding generation service using a BERT ONNX model.

public static Microsoft.SemanticKernel.IKernelBuilder AddBertOnnxTextEmbeddingGeneration (this Microsoft.SemanticKernel.IKernelBuilder builder, string onnxModelPath, string vocabPath, Microsoft.SemanticKernel.Connectors.Onnx.BertOnnxOptions? options = default, string? serviceId = default);
static member AddBertOnnxTextEmbeddingGeneration : Microsoft.SemanticKernel.IKernelBuilder * string * string * Microsoft.SemanticKernel.Connectors.Onnx.BertOnnxOptions * string -> Microsoft.SemanticKernel.IKernelBuilder
<Extension()>
Public Function AddBertOnnxTextEmbeddingGeneration (builder As IKernelBuilder, onnxModelPath As String, vocabPath As String, Optional options As BertOnnxOptions = Nothing, Optional serviceId As String = Nothing) As IKernelBuilder

Parameters

builder
IKernelBuilder

The IKernelBuilder instance to augment.

onnxModelPath
String

The path to the ONNX model file.

vocabPath
String

The path to the vocab file.

options
BertOnnxOptions

Options for the configuration of the model and service.

serviceId
String

A local identifier for the given AI service.

Returns

The same instance as builder.

Applies to