Freigeben über


HuggingFaceChatCompletionService Constructors

Definition

Overloads

HuggingFaceChatCompletionService(Uri, String, HttpClient, ILoggerFactory)

Initializes a new instance of the HuggingFaceChatCompletionService class.

HuggingFaceChatCompletionService(String, Uri, String, HttpClient, ILoggerFactory)

Initializes a new instance of the HuggingFaceChatCompletionService class.

HuggingFaceChatCompletionService(Uri, String, HttpClient, ILoggerFactory)

Initializes a new instance of the HuggingFaceChatCompletionService class.

public HuggingFaceChatCompletionService (Uri endpoint, string? apiKey = default, System.Net.Http.HttpClient? httpClient = default, Microsoft.Extensions.Logging.ILoggerFactory? loggerFactory = default);
new Microsoft.SemanticKernel.Connectors.HuggingFace.HuggingFaceChatCompletionService : Uri * string * System.Net.Http.HttpClient * Microsoft.Extensions.Logging.ILoggerFactory -> Microsoft.SemanticKernel.Connectors.HuggingFace.HuggingFaceChatCompletionService
Public Sub New (endpoint As Uri, Optional apiKey As String = Nothing, Optional httpClient As HttpClient = Nothing, Optional loggerFactory As ILoggerFactory = Nothing)

Parameters

endpoint
Uri

The uri endpoint including the port where HuggingFace server is hosted

apiKey
String

Optional API key for accessing the HuggingFace service.

httpClient
HttpClient

Optional HTTP client to be used for communication with the HuggingFace API.

loggerFactory
ILoggerFactory

Optional logger factory to be used for logging.

Applies to

HuggingFaceChatCompletionService(String, Uri, String, HttpClient, ILoggerFactory)

Initializes a new instance of the HuggingFaceChatCompletionService class.

public HuggingFaceChatCompletionService (string model, Uri? endpoint = default, string? apiKey = default, System.Net.Http.HttpClient? httpClient = default, Microsoft.Extensions.Logging.ILoggerFactory? loggerFactory = default);
new Microsoft.SemanticKernel.Connectors.HuggingFace.HuggingFaceChatCompletionService : string * Uri * string * System.Net.Http.HttpClient * Microsoft.Extensions.Logging.ILoggerFactory -> Microsoft.SemanticKernel.Connectors.HuggingFace.HuggingFaceChatCompletionService
Public Sub New (model As String, Optional endpoint As Uri = Nothing, Optional apiKey As String = Nothing, Optional httpClient As HttpClient = Nothing, Optional loggerFactory As ILoggerFactory = Nothing)

Parameters

model
String

The HuggingFace model for the chat completion service.

endpoint
Uri

The uri endpoint including the port where HuggingFace server is hosted

apiKey
String

Optional API key for accessing the HuggingFace service.

httpClient
HttpClient

Optional HTTP client to be used for communication with the HuggingFace API.

loggerFactory
ILoggerFactory

Optional logger factory to be used for logging.

Applies to