Partager via


OllamaEmbeddingGenerator Constructors

Definition

Overloads

OllamaEmbeddingGenerator(String, String, HttpClient)

Initializes a new instance of the OllamaEmbeddingGenerator class.

OllamaEmbeddingGenerator(Uri, String, HttpClient)

Initializes a new instance of the OllamaEmbeddingGenerator class.

OllamaEmbeddingGenerator(String, String, HttpClient)

Initializes a new instance of the OllamaEmbeddingGenerator class.

public OllamaEmbeddingGenerator (string endpoint, string? modelId = default, System.Net.Http.HttpClient? httpClient = default);
new Microsoft.Extensions.AI.OllamaEmbeddingGenerator : string * string * System.Net.Http.HttpClient -> Microsoft.Extensions.AI.OllamaEmbeddingGenerator
Public Sub New (endpoint As String, Optional modelId As String = Nothing, Optional httpClient As HttpClient = Nothing)

Parameters

endpoint
String

The endpoint URI where Ollama is hosted.

modelId
String

The id of the model to use. This may also be overridden per request via ModelId. Either this parameter or ModelId must provide a valid model id.

httpClient
HttpClient

An HttpClient instance to use for HTTP operations.

Applies to

OllamaEmbeddingGenerator(Uri, String, HttpClient)

Initializes a new instance of the OllamaEmbeddingGenerator class.

public OllamaEmbeddingGenerator (Uri endpoint, string? modelId = default, System.Net.Http.HttpClient? httpClient = default);
new Microsoft.Extensions.AI.OllamaEmbeddingGenerator : Uri * string * System.Net.Http.HttpClient -> Microsoft.Extensions.AI.OllamaEmbeddingGenerator
Public Sub New (endpoint As Uri, Optional modelId As String = Nothing, Optional httpClient As HttpClient = Nothing)

Parameters

endpoint
Uri

The endpoint URI where Ollama is hosted.

modelId
String

The id of the model to use. This may also be overridden per request via ModelId. Either this parameter or ModelId must provide a valid model id.

httpClient
HttpClient

An HttpClient instance to use for HTTP operations.

Applies to