BertOnnxTextEmbeddingGenerationService.CreateAsync 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
CreateAsync(Stream, Stream, BertOnnxOptions, CancellationToken) |
Creates a new instance of the BertOnnxTextEmbeddingGenerationService class. |
CreateAsync(String, String, BertOnnxOptions, CancellationToken) |
Creates a new instance of the BertOnnxTextEmbeddingGenerationService class. |
CreateAsync(Stream, Stream, BertOnnxOptions, CancellationToken)
Creates a new instance of the BertOnnxTextEmbeddingGenerationService class.
public static System.Threading.Tasks.Task<Microsoft.SemanticKernel.Connectors.Onnx.BertOnnxTextEmbeddingGenerationService> CreateAsync (System.IO.Stream onnxModelStream, System.IO.Stream vocabStream, Microsoft.SemanticKernel.Connectors.Onnx.BertOnnxOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
static member CreateAsync : System.IO.Stream * System.IO.Stream * Microsoft.SemanticKernel.Connectors.Onnx.BertOnnxOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.SemanticKernel.Connectors.Onnx.BertOnnxTextEmbeddingGenerationService>
Public Shared Function CreateAsync (onnxModelStream As Stream, vocabStream As Stream, Optional options As BertOnnxOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of BertOnnxTextEmbeddingGenerationService)
Parameters
- onnxModelStream
- Stream
Stream containing the ONNX model.
- vocabStream
- Stream
Stream containing the vocab file.
- options
- BertOnnxOptions
Options for the configuration of the model and service.
- cancellationToken
- CancellationToken
The CancellationToken to monitor for cancellation requests. The default is None.
Returns
Applies to
CreateAsync(String, String, BertOnnxOptions, CancellationToken)
Creates a new instance of the BertOnnxTextEmbeddingGenerationService class.
public static System.Threading.Tasks.Task<Microsoft.SemanticKernel.Connectors.Onnx.BertOnnxTextEmbeddingGenerationService> CreateAsync (string onnxModelPath, string vocabPath, Microsoft.SemanticKernel.Connectors.Onnx.BertOnnxOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
static member CreateAsync : string * string * Microsoft.SemanticKernel.Connectors.Onnx.BertOnnxOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.SemanticKernel.Connectors.Onnx.BertOnnxTextEmbeddingGenerationService>
Public Shared Function CreateAsync (onnxModelPath As String, vocabPath As String, Optional options As BertOnnxOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of BertOnnxTextEmbeddingGenerationService)
Parameters
- 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.
- cancellationToken
- CancellationToken
The CancellationToken to monitor for cancellation requests. The default is None.