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

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

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

# EmbeddingListener

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

The calls a text-embedding request makes on the model's worker thread, in order: [onEmbeddings](onEmbeddings.md) once with one vector per text (in the texts' 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: [EmbeddingReport](../EmbeddingReport/index.md))<br>The request ended: its facts. A canceled request ends here with [EmbeddingReport.canceled](../EmbeddingReport/canceled.md) true. |
| [onEmbeddings](onEmbeddings.md) | [common]<br>abstract fun [onEmbeddings](onEmbeddings.md)(embeddings: [List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)&lt;[FloatArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html)&gt;)<br>One vector per text, in the texts' order; every vector has the model's embedding length. |
| [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. |