messages property
The full history of the conversation, including the request messages and the final model response.
This is useful for continuing the conversation in multi-turn scenarios. When the response has no message (e.g. an aborted turn), only the request history is returned, so callers can attempt to resume from the last good state.
Implementation
List<Message> get messages => [
...(_request?.messages ?? _response.request?.messages ?? []),
if (_response.message != null) _response.message!,
];