# StreamingCallback


```
interface StreamingCallback
```

<br />

*** ** * ** ***

Callback function to receive a streaming result.

## Summary

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/common/StreamingCallback#onNewText(java.lang.String)(additionalText: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` Called when a new text is available. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/common/StreamingCallback#onNewThought(java.lang.String)(additionalThought: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` Called when a new thought is available. |

## Public functions

### onNewText

```
fun onNewText(additionalText: String): Unit
```

Called when a new text is available.

| Parameters |
|---|---|
| `additionalText: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | the new text. |

### onNewThought

```
fun onNewThought(additionalThought: String): Unit
```

Called when a new thought is available.

| Parameters |
|---|---|
| `additionalThought: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | the new thought text. |