AbstractOpenAILLMClient

constructor(settings: OpenAIBaseSettings, httpClient: KoogHttpClient, clock: KoogClock = KoogClock.System, logger: KLogger, toolsConverter: OpenAICompatibleToolDescriptorSchemaGenerator)(source)

Parameters

settings

Configuration settings including base URL, API paths, and timeout configuration.

httpClient

A fully configured KoogHttpClient for making API requests. Must have authentication and other request defaults (base URL, timeouts, headers) already embedded. To use a factory-backed client with standard OpenAI-compatible defaults, use the secondary constructor that accepts a KoogHttpClient.Factory and an API key.

clock

KoogClock used for tracking response metadata timestamps. Defaults to KoogClock.System.


constructor(apiKey: String, settings: OpenAIBaseSettings, httpClientFactory: KoogHttpClient.Factory, clientName: String, clock: KoogClock = KoogClock.System, logger: KLogger, toolsConverter: OpenAICompatibleToolDescriptorSchemaGenerator)(source)

Secondary constructor for creating a client backed by a KoogHttpClient.Factory. Configures authentication, base URL, timeouts, and JSON serialization automatically from apiKey and settings.