//clika-runtime/io.clika.modelverse/ChatSession/send
send
[common]
fun send(content: String, config: GenerationConfig = model.capabilities.defaults, images: List<ByteArray> = emptyList(), tools: List<ToolDef>? = null): String
Send one user turn and block for the reply: content with images is appended, the conversation is sent under config (the model's defaults when omitted) with tools offered (the session's when null), and the reply's visible text is appended as the assistant turn and answered. A failure throws ModelverseException with the library's message and leaves the user turn in place, so respond may try again; an offer to a model that takes no tools throws IllegalArgumentException and appends nothing.
[common]
fun send(content: String, listener: GenerationListener, config: GenerationConfig = model.capabilities.defaults, images: List<ByteArray> = emptyList(), tools: List<ToolDef>? = null): GenerationHandle
Send one user turn and stream the reply: listener hears the pieces on the model's worker thread (GenerationListener), each call the reply made through GenerationListener.onToolCall, and the assistant turn is appended when GenerationListener.onDone arrives, with the text streamed so far on a canceled reply. The returned handle cancels.