OnnxServiceCollectionExtensions.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(IServiceCollection, Stream, Stream, BertOnnxOptions, String) |
Adds a text embedding generation service using a BERT ONNX model. |
AddBertOnnxTextEmbeddingGeneration(IServiceCollection, String, String, BertOnnxOptions, String) |
Adds a text embedding generation service using a BERT ONNX model. |
AddBertOnnxTextEmbeddingGeneration(IServiceCollection, Stream, Stream, BertOnnxOptions, String)
Adds a text embedding generation service using a BERT ONNX model.
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddBertOnnxTextEmbeddingGeneration (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.IO.Stream onnxModelStream, System.IO.Stream vocabStream, Microsoft.SemanticKernel.Connectors.Onnx.BertOnnxOptions? options = default, string? serviceId = default);
static member AddBertOnnxTextEmbeddingGeneration : Microsoft.Extensions.DependencyInjection.IServiceCollection * System.IO.Stream * System.IO.Stream * Microsoft.SemanticKernel.Connectors.Onnx.BertOnnxOptions * string -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddBertOnnxTextEmbeddingGeneration (services As IServiceCollection, onnxModelStream As Stream, vocabStream As Stream, Optional options As BertOnnxOptions = Nothing, Optional serviceId As String = Nothing) As IServiceCollection
Parameters
- services
- IServiceCollection
The IServiceCollection 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 services
.
Applies to
AddBertOnnxTextEmbeddingGeneration(IServiceCollection, String, String, BertOnnxOptions, String)
Adds a text embedding generation service using a BERT ONNX model.
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddBertOnnxTextEmbeddingGeneration (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string onnxModelPath, string vocabPath, Microsoft.SemanticKernel.Connectors.Onnx.BertOnnxOptions? options = default, string? serviceId = default);
static member AddBertOnnxTextEmbeddingGeneration : Microsoft.Extensions.DependencyInjection.IServiceCollection * string * string * Microsoft.SemanticKernel.Connectors.Onnx.BertOnnxOptions * string -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddBertOnnxTextEmbeddingGeneration (services As IServiceCollection, onnxModelPath As String, vocabPath As String, Optional options As BertOnnxOptions = Nothing, Optional serviceId As String = Nothing) As IServiceCollection
Parameters
- services
- IServiceCollection
The IServiceCollection 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 services
.