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

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

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

# respond

[common]\
fun [respond](respond.md)(config: [GenerationConfig](../GenerationConfig/index.md) = model.capabilities.defaults, 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)

Reply to the conversation as it stands, blocking: the last turn must be a user turn or a tool result. The reply's visible text is appended as the assistant turn and answered.

[common]\
fun [respond](respond.md)(listener: [GenerationListener](../GenerationListener/index.md), config: [GenerationConfig](../GenerationConfig/index.md) = model.capabilities.defaults, 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)

Reply to the conversation as it stands, streamed through [listener](respond.md); the assistant turn is appended when [GenerationListener.onDone](../GenerationListener/onDone.md) arrives.