LlmResponse
LLM response class that provides the first candidate response from the model if available. Otherwise, contains the error code and message.
Constructors
Types
Fluent builder for LlmResponse, provided primarily for Java callers. Any property left unset falls back to the same default as the constructor.
Properties
Context cache metadata for this response, populated when context caching is enabled. null when caching is disabled or no cache information is available.
The citation metadata of the response.
Optional key-value pairs labeling the response. The entire map must be JSON serializable.
Error message if the response is an error.
The finish reason of the response.
The grounding metadata of the response.
Flag indicating that LLM was interrupted when generating the content. Usually it's due to user interruption during a bidi streaming.
The model version used to generate the response.
The usage metadata of the LlmResponse.