AbstractOpenAILLMClient
Abstract base class for OpenAI-compatible LLM clients. Provides common functionality for communicating with OpenAI and OpenAI-compatible APIs.
Parameters
Configuration settings including base URL, API paths, and timeout configuration.
A fully configured KoogHttpClient for making API requests. Must have authentication and other request defaults (base URL, timeouts, headers) already embedded. To use a Ktor-backed client with standard OpenAI-compatible defaults, use the secondary constructor that accepts an HttpClient and an API key.
Clock instance used for tracking response metadata timestamps. Defaults to Clock.System.
Constructors
Secondary constructor for creating a client backed by a Ktor HttpClient. Configures authentication, base URL, timeouts, and JSON serialization automatically from apiKey and settings.