OpenAIChatClient Constructors
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
OpenAIChatClient(ChatClient) |
Initializes a new instance of the OpenAIChatClient class for the specified ChatClient. |
OpenAIChatClient(OpenAIClient, String) |
Initializes a new instance of the OpenAIChatClient class for the specified OpenAIClient. |
OpenAIChatClient(ChatClient)
- Source:
- OpenAIChatClient.cs
Initializes a new instance of the OpenAIChatClient class for the specified ChatClient.
public:
OpenAIChatClient(OpenAI::Chat::ChatClient ^ chatClient);
public OpenAIChatClient(OpenAI.Chat.ChatClient chatClient);
new Microsoft.Extensions.AI.OpenAIChatClient : OpenAI.Chat.ChatClient -> Microsoft.Extensions.AI.OpenAIChatClient
Public Sub New (chatClient As ChatClient)
Parameters
- chatClient
- ChatClient
The underlying client.
Exceptions
chatClient
is null
.
Applies to
OpenAIChatClient(OpenAIClient, String)
- Source:
- OpenAIChatClient.cs
Initializes a new instance of the OpenAIChatClient class for the specified OpenAIClient.
public:
OpenAIChatClient(OpenAI::OpenAIClient ^ openAIClient, System::String ^ modelId);
public OpenAIChatClient(OpenAI.OpenAIClient openAIClient, string modelId);
new Microsoft.Extensions.AI.OpenAIChatClient : OpenAI.OpenAIClient * string -> Microsoft.Extensions.AI.OpenAIChatClient
Public Sub New (openAIClient As OpenAIClient, modelId As String)
Parameters
- openAIClient
- OpenAIClient
The underlying client.
- modelId
- String
The model to use.
Exceptions
openAIClient
is null
.
modelId
is empty or composed entirely of whitespace.