次の方法で共有


OpenAIClientProvider.ForOpenAI Method

Definition

Overloads

ForOpenAI(Uri, HttpClient)

Produce a OpenAIClientProvider based on OpenAI.OpenAIClient.

ForOpenAI(ApiKeyCredential, Uri, HttpClient)

Produce a OpenAIClientProvider based on OpenAI.OpenAIClient.

ForOpenAI(Uri, HttpClient)

Produce a OpenAIClientProvider based on OpenAI.OpenAIClient.

public static Microsoft.SemanticKernel.Agents.OpenAI.OpenAIClientProvider ForOpenAI (Uri? endpoint = default, System.Net.Http.HttpClient? httpClient = default);
static member ForOpenAI : Uri * System.Net.Http.HttpClient -> Microsoft.SemanticKernel.Agents.OpenAI.OpenAIClientProvider
Public Shared Function ForOpenAI (Optional endpoint As Uri = Nothing, Optional httpClient As HttpClient = Nothing) As OpenAIClientProvider

Parameters

endpoint
Uri

An optional endpoint

httpClient
HttpClient

Custom HttpClient for HTTP requests.

Returns

Applies to

ForOpenAI(ApiKeyCredential, Uri, HttpClient)

Produce a OpenAIClientProvider based on OpenAI.OpenAIClient.

public static Microsoft.SemanticKernel.Agents.OpenAI.OpenAIClientProvider ForOpenAI (System.ClientModel.ApiKeyCredential apiKey, Uri? endpoint = default, System.Net.Http.HttpClient? httpClient = default);
static member ForOpenAI : System.ClientModel.ApiKeyCredential * Uri * System.Net.Http.HttpClient -> Microsoft.SemanticKernel.Agents.OpenAI.OpenAIClientProvider
Public Shared Function ForOpenAI (apiKey As ApiKeyCredential, Optional endpoint As Uri = Nothing, Optional httpClient As HttpClient = Nothing) As OpenAIClientProvider

Parameters

apiKey
ApiKeyCredential

The API key

endpoint
Uri

An optional endpoint

httpClient
HttpClient

Custom HttpClient for HTTP requests.

Returns

Applies to