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

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

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

# GenerationReport

[common]\
data class [GenerationReport](index.md)(val finish: [FinishReason](../FinishReason/index.md), val promptTokens: [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html), val completionTokens: [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html), val timeToFirstTokenMs: [Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html), val prefillTokensPerSecond: [Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html), val decodeTokensPerSecond: [Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html), val latencyMs: [Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html), val accelerator: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), val cachedPromptTokens: [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) = 0, val text: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) = &quot;&quot;, val reasoning: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) = &quot;&quot;, val visibleText: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) = &quot;&quot;, val toolCalls: [List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)&lt;[ToolCall](../ToolCall/index.md)&gt; = emptyList(), val toolsCalled: [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) = false)

The counts and timings of one generation, delivered once through [GenerationListener.onDone](../GenerationListener/onDone.md).

## Constructors

| | |
|---|---|
| [GenerationReport](GenerationReport.md) | [common]<br>constructor(finish: [FinishReason](../FinishReason/index.md), promptTokens: [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html), completionTokens: [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html), timeToFirstTokenMs: [Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html), prefillTokensPerSecond: [Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html), decodeTokensPerSecond: [Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html), latencyMs: [Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html), accelerator: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), cachedPromptTokens: [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) = 0, text: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) = &quot;&quot;, reasoning: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) = &quot;&quot;, visibleText: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) = &quot;&quot;, toolCalls: [List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)&lt;[ToolCall](../ToolCall/index.md)&gt; = emptyList(), toolsCalled: [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) = false) |

## Properties

| Name | Summary |
|---|---|
| [accelerator](accelerator.md) | [common]<br>val [accelerator](accelerator.md): [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)<br>The compute the request ran on, as the compute API's name (`CPU`; an accelerator among several carries its ordinal, `CUDA:1`). |
| [cachedPromptTokens](cachedPromptTokens.md) | [common]<br>val [cachedPromptTokens](cachedPromptTokens.md): [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) = 0<br>Of [promptTokens](promptTokens.md), the tokens the model's cache served from an earlier turn instead of computing them again: a chat sends the whole conversation on every turn, and the text model keeps a finished turn's cache for the next; 0 when nothing was served. |
| [completionTokens](completionTokens.md) | [common]<br>val [completionTokens](completionTokens.md): [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)<br>The tokens the model produced. |
| [decodeTokensPerSecond](decodeTokensPerSecond.md) | [common]<br>val [decodeTokensPerSecond](decodeTokensPerSecond.md): [Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)<br>Reply tokens produced per second, over the decode span. |
| [finish](finish.md) | [common]<br>val [finish](finish.md): [FinishReason](../FinishReason/index.md) |
| [latencyMs](latencyMs.md) | [common]<br>val [latencyMs](latencyMs.md): [Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)<br>The whole request, in milliseconds. |
| [prefillTokensPerSecond](prefillTokensPerSecond.md) | [common]<br>val [prefillTokensPerSecond](prefillTokensPerSecond.md): [Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)<br>Prompt tokens ingested per second. |
| [promptTokens](promptTokens.md) | [common]<br>val [promptTokens](promptTokens.md): [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)<br>The prompt tokens the model ingested. |
| [reasoning](reasoning.md) | [common]<br>val [reasoning](reasoning.md): [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)<br>The reasoning channel's text ([GenerationListener.onThinking](../GenerationListener/onThinking.md) joined); empty when the request had none. |
| [text](text.md) | [common]<br>val [text](text.md): [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)<br>The whole reply as the model wrote it, the reasoning channel's text included where the request had one; the text streamed so far on a canceled reply. |
| [timeToFirstTokenMs](timeToFirstTokenMs.md) | [common]<br>val [timeToFirstTokenMs](timeToFirstTokenMs.md): [Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)<br>From the request to the first streamed token, in milliseconds. |
| [toolCalls](toolCalls.md) | [common]<br>val [toolCalls](toolCalls.md): [List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)&lt;[ToolCall](../ToolCall/index.md)&gt;<br>The calls the reply made, as the model's call format wrote them (an id only where the format wrote one). |
| [toolsCalled](toolsCalled.md) | [common]<br>val [toolsCalled](toolsCalled.md): [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) = false<br>True when the reply called a tool; [finish](finish.md) then reads [FinishReason.TOOL_CALLS](../FinishReason/TOOL_CALLS/index.md). |
| [visibleText](visibleText.md) | [common]<br>val [visibleText](visibleText.md): [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)<br>The reply's user-facing text ([GenerationListener.onToken](../GenerationListener/onToken.md) joined): [text](text.md) without the reasoning channel. |