OnnxKernelBuilderExtensions.AddBertOnnxTextEmbeddingGeneration 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
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
.