aggregate

suspend fun aggregate(): LlmResponse?

Flushes any buffered content and returns the final aggregated response.

This method should be called once after all streaming responses have been processed via processResponse. It ensures any pending text or function call data is added to the parts list, and then constructs a single LlmResponse containing all aggregated parts and metadata, with partial set to false.

Return

The final aggregated LlmResponse, or null if no responses were processed.