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

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

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

# RerankListener

[common]\
interface [RerankListener](index.md)

The calls a reranking request makes on the model's worker thread, in order: [onScores](onScores.md) once with one relevance score per document (in the documents' order), then [onDone](onDone.md); or [onError](onError.md) alone when the request fails.

## Functions

| Name | Summary |
|---|---|
| [onDone](onDone.md) | [common]<br>abstract fun [onDone](onDone.md)(report: [RerankReport](../RerankReport/index.md))<br>The request ended: its facts. A canceled request ends here with [RerankReport.canceled](../RerankReport/canceled.md) true. |
| [onError](onError.md) | [common]<br>abstract fun [onError](onError.md)(message: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html))<br>The request failed; the model's message. The request is over. |
| [onScores](onScores.md) | [common]<br>abstract fun [onScores](onScores.md)(scores: [FloatArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html))<br>One relevance score per document, in the documents' order; a higher score is a better match. |