public class OpenAIProvider extends Object implements LLMProvider:
OpenAI-compatible HTTP provider.
Despite its name, this class targets the chat-completions style API used by many OpenAI-compatible providers.
| Modifier and Type | Member | Description |
|---|---|---|
| public | apiKeyapiKey as String |
Bearer API key. |
| public | baseUrlbaseUrl as String |
Provider API root. |
| public | httpClienthttpClient as HttpClient |
HTTP client used for provider calls. |
| public | modelmodel as String |
Model identifier. |
| public | temperaturetemperature as Double |
Sampling temperature. |
| Modifier and Type | Member | Description |
|---|---|---|
| public readonly property | chatCompletionsUrlchatCompletionsUrl as String: |
Returns the final chat-completions endpoint. |
| public property | reasoningEffortreasoningEffort as String: |
Optional reasoning effort level for models that expose that parameter. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | OpenAIProviderOpenAIProvider(baseUrl as String, apiKey as String, model as String, temperature as Double = 0.7): |
Creates a configured provider. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | cancelcancel() as Void: |
Cancels the currently running provider HTTP request, if any. |
| public override | completecomplete(request as LLMRequest) as LLMResponse throws Exception: |
Sends one completion request. |