OllamaTextEmbeddingGenerationService 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
| OllamaTextEmbeddingGenerationService(OllamaApiClient, ILoggerFactory) |
Initializes a new instance of the OllamaTextEmbeddingGenerationService class. |
| OllamaTextEmbeddingGenerationService(String, HttpClient, ILoggerFactory) |
Initializes a new instance of the OllamaTextEmbeddingGenerationService class. |
| OllamaTextEmbeddingGenerationService(String, Uri, ILoggerFactory) |
Initializes a new instance of the OllamaTextEmbeddingGenerationService class. |
OllamaTextEmbeddingGenerationService(OllamaApiClient, ILoggerFactory)
Initializes a new instance of the OllamaTextEmbeddingGenerationService class.
public OllamaTextEmbeddingGenerationService(OllamaSharp.OllamaApiClient ollamaClient, Microsoft.Extensions.Logging.ILoggerFactory? loggerFactory = default);
new Microsoft.SemanticKernel.Connectors.Ollama.OllamaTextEmbeddingGenerationService : OllamaSharp.OllamaApiClient * Microsoft.Extensions.Logging.ILoggerFactory -> Microsoft.SemanticKernel.Connectors.Ollama.OllamaTextEmbeddingGenerationService
Public Sub New (ollamaClient As OllamaApiClient, Optional loggerFactory As ILoggerFactory = Nothing)
Parameters
- ollamaClient
- OllamaSharp.OllamaApiClient
The Ollama API client.
- loggerFactory
- ILoggerFactory
Optional logger factory to be used for logging.
Applies to
OllamaTextEmbeddingGenerationService(String, HttpClient, ILoggerFactory)
Initializes a new instance of the OllamaTextEmbeddingGenerationService class.
public OllamaTextEmbeddingGenerationService(string modelId, System.Net.Http.HttpClient httpClient, Microsoft.Extensions.Logging.ILoggerFactory? loggerFactory = default);
new Microsoft.SemanticKernel.Connectors.Ollama.OllamaTextEmbeddingGenerationService : string * System.Net.Http.HttpClient * Microsoft.Extensions.Logging.ILoggerFactory -> Microsoft.SemanticKernel.Connectors.Ollama.OllamaTextEmbeddingGenerationService
Public Sub New (modelId As String, httpClient As HttpClient, Optional loggerFactory As ILoggerFactory = Nothing)
Parameters
- modelId
- String
The hosted model.
- httpClient
- HttpClient
HTTP client to be used for communication with the Ollama API.
- loggerFactory
- ILoggerFactory
Optional logger factory to be used for logging.
Applies to
OllamaTextEmbeddingGenerationService(String, Uri, ILoggerFactory)
Initializes a new instance of the OllamaTextEmbeddingGenerationService class.
public OllamaTextEmbeddingGenerationService(string modelId, Uri endpoint, Microsoft.Extensions.Logging.ILoggerFactory? loggerFactory = default);
new Microsoft.SemanticKernel.Connectors.Ollama.OllamaTextEmbeddingGenerationService : string * Uri * Microsoft.Extensions.Logging.ILoggerFactory -> Microsoft.SemanticKernel.Connectors.Ollama.OllamaTextEmbeddingGenerationService
Public Sub New (modelId As String, endpoint As Uri, Optional loggerFactory As ILoggerFactory = Nothing)
Parameters
- modelId
- String
The hosted model.
- endpoint
- Uri
The endpoint including the port where Ollama server is hosted
- loggerFactory
- ILoggerFactory
Optional logger factory to be used for logging.