FunctionResponsePart

data class FunctionResponsePart : Part


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

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

Public constructors

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

Public properties

String?

optional unique identifier for the function call.

String

function name.

Map<String, Any?>

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.