Package-level declarations
Types
Link copied to clipboard
class OpenAiChatModel(client: HttpClient, apiKey: String?, model: String, parameters: JsonObject = JsonObject(emptyMap()), headers: Map<String, String> = emptyMap(), baseUrl: String = OPENAI_BASE_URL, timeout: Duration? = 5.minutes) : ChatModel
A ChatModel that calls a model through the Chat Completions API of OpenAI. Many other servers have the same API, among them Ollama, LM Studio, vLLM, Groq and OpenRouter, so this one class reaches the models of OpenAI and models that run on your own machine. It is built on Ktor, so it runs on every Kotlin target.