---
title: "send"
sidebar_label: "send"
description: "Kotlin binding reference: send."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

//[clika-runtime](../../../index.md)/[io.clika.modelverse](../index.md)/[ChatSession](index.md)/[send](send.md)

# send

[common]\
fun [send](send.md)(content: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), config: [GenerationConfig](../GenerationConfig/index.md) = model.capabilities.defaults, images: [List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)&lt;[ByteArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html)&gt; = emptyList(), tools: [List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)&lt;[ToolDef](../ToolDef/index.md)&gt;? = null): [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)

Send one user turn and block for the reply: [content](send.md) with [images](send.md) is appended, the conversation is sent under [config](send.md) (the model's defaults when omitted) with [tools](send.md) offered (the session's when null), and the reply's visible text is appended as the assistant turn and answered. A failure throws [ModelverseException](../ModelverseException/index.md) with the library's message and leaves the user turn in place, so [respond](respond.md) may try again; an offer to a model that takes no tools throws IllegalArgumentException and appends nothing.

[common]\
fun [send](send.md)(content: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), listener: [GenerationListener](../GenerationListener/index.md), config: [GenerationConfig](../GenerationConfig/index.md) = model.capabilities.defaults, images: [List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)&lt;[ByteArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-byte-array/index.html)&gt; = emptyList(), tools: [List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)&lt;[ToolDef](../ToolDef/index.md)&gt;? = null): [GenerationHandle](../GenerationHandle/index.md)

Send one user turn and stream the reply: [listener](send.md) hears the pieces on the model's worker thread ([GenerationListener](../GenerationListener/index.md)), each call the reply made through [GenerationListener.onToolCall](../GenerationListener/onToolCall.md), and the assistant turn is appended when [GenerationListener.onDone](../GenerationListener/onDone.md) arrives, with the text streamed so far on a canceled reply. The returned handle cancels.