OpenAIClientProvider.ForOpenAI Method
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
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.