FunctionResponsePart

public final class FunctionResponsePart extends 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

Nested types

public static class FunctionResponsePart.Companion

Public constructors

FunctionResponsePart(
    String id,
    @NonNull String name,
    @NonNull Map<@NonNull String, Object> response
)

Public methods

final String

optional unique identifier for the function call.

final @NonNull String

function name.

final @NonNull Map<@NonNull String, Object>

map of property name to response value.

Public constructors

FunctionResponsePart

public FunctionResponsePart(
    String id,
    @NonNull String name,
    @NonNull Map<@NonNull String, Object> response
)

Public methods

getId

public final String getId()

optional unique identifier for the function call.

getName

public final @NonNull String getName()

function name.

getResponse

public final @NonNull Map<@NonNull String, Object> getResponse()

map of property name to response value.