functionCalls property

Iterable<FunctionCall> functionCalls

The function call parts of the first candidate in candidates, if any.

Returns an empty list if there are no candidates, or if the first candidate has no FunctionCall parts. There is no error thrown if the prompt or response were blocked.

Implementation

Iterable<FunctionCall> get functionCalls =>
    candidates.firstOrNull?.content.parts.whereType<FunctionCall>() ??
    const [];