# FunctionResponsePart


```
data class FunctionResponsePart : Part
```

<br />

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) |||
| ↳ | [com.google.mlkit.genai.prompt.Part](https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/prompt/Part) ||
|   | ↳ | [com.google.mlkit.genai.prompt.FunctionResponsePart](https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/prompt/FunctionResponsePart) |

*** ** * ** ***

A data class representing a function response part of a prompt.

Used in multi-turn conversation history to provide the result of executing a function call back to the model as input, enabling the model to generate the final response.

## Summary

| ### Public companion functions |
|---|---|
| `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/prompt/FunctionResponsePart` | `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/prompt/FunctionResponsePart#create(kotlin.String,kotlin.collections.Map)(name: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html, response: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html, https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html?>)` |
| `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/prompt/FunctionResponsePart` | `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/prompt/FunctionResponsePart#create(kotlin.String,kotlin.String,kotlin.collections.Map)(id: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html?, name: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html, response: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html, https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html?>)` |

| ### Public constructors |
|---|
| `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/prompt/FunctionResponsePart#FunctionResponsePart(kotlin.String,kotlin.String,kotlin.collections.Map)(id: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html?, name: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html, response: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html, https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html?>)` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html?` | `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/prompt/FunctionResponsePart#id()` optional unique identifier for the function call. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/prompt/FunctionResponsePart#name()` function name. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html, https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html?>` | `https://developers.google.com/android/reference/kotlin/com/google/mlkit/genai/prompt/FunctionResponsePart#response()` map of property name to response value. |

## Public companion functions

### create

```
fun create(name: String, response: Map<String, Any?>): FunctionResponsePart
```

### create

```
fun create(id: String?, name: String, response: Map<String, Any?>): FunctionResponsePart
```

## Public constructors

### FunctionResponsePart

```
FunctionResponsePart(
    id: String? = null,
    name: String,
    response: Map<String, Any?>
)
```

## Public properties

### id

```
val id: String?
```

optional unique identifier for the function call.

### name

```
val name: String
```

function name.

### response

```
val response: Map<String, Any?>
```

map of property name to response value.