OpenAITextEmbeddingGenerationService Constructors
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
OpenAITextEmbeddingGenerationService(String, OpenAIClient, ILoggerFactory, Nullable<Int32>) |
Initializes a new instance of the OpenAITextEmbeddingGenerationService class. |
OpenAITextEmbeddingGenerationService(String, String, String, HttpClient, ILoggerFactory, Nullable<Int32>) |
Initializes a new instance of the OpenAITextEmbeddingGenerationService class. |
OpenAITextEmbeddingGenerationService(String, OpenAIClient, ILoggerFactory, Nullable<Int32>)
Initializes a new instance of the OpenAITextEmbeddingGenerationService class.
public OpenAITextEmbeddingGenerationService (string modelId, OpenAI.OpenAIClient openAIClient, Microsoft.Extensions.Logging.ILoggerFactory? loggerFactory = default, int? dimensions = default);
new Microsoft.SemanticKernel.Connectors.OpenAI.OpenAITextEmbeddingGenerationService : string * OpenAI.OpenAIClient * Microsoft.Extensions.Logging.ILoggerFactory * Nullable<int> -> Microsoft.SemanticKernel.Connectors.OpenAI.OpenAITextEmbeddingGenerationService
Public Sub New (modelId As String, openAIClient As OpenAIClient, Optional loggerFactory As ILoggerFactory = Nothing, Optional dimensions As Nullable(Of Integer) = Nothing)
Parameters
- modelId
- String
Model name
- openAIClient
- OpenAI.OpenAIClient
Custom OpenAI.OpenAIClient for HTTP requests.
- loggerFactory
- ILoggerFactory
The ILoggerFactory to use for logging. If null, no logging will be performed.
The number of dimensions the resulting output embeddings should have. Only supported in "text-embedding-3" and later models.
Applies to
OpenAITextEmbeddingGenerationService(String, String, String, HttpClient, ILoggerFactory, Nullable<Int32>)
Initializes a new instance of the OpenAITextEmbeddingGenerationService class.
public OpenAITextEmbeddingGenerationService (string modelId, string apiKey, string? organization = default, System.Net.Http.HttpClient? httpClient = default, Microsoft.Extensions.Logging.ILoggerFactory? loggerFactory = default, int? dimensions = default);
new Microsoft.SemanticKernel.Connectors.OpenAI.OpenAITextEmbeddingGenerationService : string * string * string * System.Net.Http.HttpClient * Microsoft.Extensions.Logging.ILoggerFactory * Nullable<int> -> Microsoft.SemanticKernel.Connectors.OpenAI.OpenAITextEmbeddingGenerationService
Public Sub New (modelId As String, apiKey As String, Optional organization As String = Nothing, Optional httpClient As HttpClient = Nothing, Optional loggerFactory As ILoggerFactory = Nothing, Optional dimensions As Nullable(Of Integer) = Nothing)
Parameters
- modelId
- String
Model name
- apiKey
- String
OpenAI API Key
- organization
- String
OpenAI Organization Id (usually optional)
- httpClient
- HttpClient
Custom HttpClient for HTTP requests.
- loggerFactory
- ILoggerFactory
The ILoggerFactory to use for logging. If null, no logging will be performed.
The number of dimensions the resulting output embeddings should have. Only supported in "text-embedding-3" and later models.