ChatClient
Provider-agnostic contract for chat-based LLM clients.
Implementations of this interface handle communication with a specific LLM provider (e.g. OpenAI, Ollama, Groq) while exposing a unified API for sending messages, streaming responses, and listing available models.
Three overloads are provided for both blocking and streaming chat:
A raw io.kory.core.chat.request.ChatRequest overload for full control.
A DSL-based overload using io.kory.core.dsl.chat.ChatBuilder for concise message construction.
A DSL-based overload using io.kory.core.dsl.chat.request.ChatRequestBuilder for configuring temperature, max tokens, reasoning, and tools alongside the chat.
Functions
Sends a chat request to the LLM provider and returns a non-streaming response.
Sends a chat using full DSL configuration.
Sends a chat using DSL-style message construction.
Sends a chat request and wraps the result in a Result.
Sends a chat request using the request DSL and wraps the result in a Result.
Sends a chat request using the message DSL and wraps the result in a Result.
Streams a chat request, returning chunks as they arrive.
Streams a chat using full DSL configuration.
Streams a chat using DSL-style message construction.
Lists all available models from the provider.