OpenAICompatibleWebClient
OpenAICompatibleWebClient(string, string, string)
Creates an instance of the OpenAI-compatible web client.
public OpenAICompatibleWebClient(string model, string apiKey, string baseUrl)
| Parameter | Type | Description |
|---|
| model | String | Model name supported by the LLM provider. |
| apiKey | String | API key (token). |
| baseUrl | String | Base URL of the OpenAI-compatible LLM. |
Exceptions
| exception | condition |
|---|
| ArgumentException | API key value can’t be null or empty. |
| ArgumentException | Text model value can’t be null or empty. |
| ArgumentException | Base URL value can’t be null or empty. |
See Also
OpenAICompatibleWebClient(string, string, string, HttpClient)
Creates an instance of the OpenAI-compatible web client that uses an externally managed HttpClient. The provided HttpClient is not disposed by this instance and remains owned by the caller.
public OpenAICompatibleWebClient(string model, string apiKey, string baseUrl, HttpClient httpClient)
| Parameter | Type | Description |
|---|
| model | String | Model name supported by the LLM provider. |
| apiKey | String | API key (token). |
| baseUrl | String | Base URL of the OpenAI-compatible LLM. |
| httpClient | HttpClient | An externally managed HttpClient instance. |
Exceptions
| exception | condition |
|---|
| ArgumentException | API key value can’t be null or empty. |
| ArgumentException | Text model value can’t be null or empty. |
| ArgumentException | Base URL value can’t be null or empty. |
| ArgumentNullException | HttpClient can’t be null. |
See Also