Freigeben über


OpenAIFileService Constructors

Definition

Overloads

OpenAIFileService(String, String, HttpClient, ILoggerFactory)

Create an instance of the OpenAI chat completion connector

OpenAIFileService(Uri, String, String, String, HttpClient, ILoggerFactory)

Create an instance of the Azure OpenAI chat completion connector

OpenAIFileService(String, String, HttpClient, ILoggerFactory)

Create an instance of the OpenAI chat completion connector

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

Parameters

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.

Applies to

OpenAIFileService(Uri, String, String, String, HttpClient, ILoggerFactory)

Create an instance of the Azure OpenAI chat completion connector

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

Parameters

endpoint
Uri

Azure Endpoint URL

apiKey
String

Azure OpenAI API Key

organization
String

OpenAI Organization Id (usually optional)

version
String

The API version to target.

httpClient
HttpClient

Custom HttpClient for HTTP requests.

loggerFactory
ILoggerFactory

The ILoggerFactory to use for logging. If null, no logging will be performed.

Applies to