# Class LlmResponse.Builder

java.lang.Object
com.google.adk.models.LlmResponse.Builder

Enclosing class:
  `LlmResponse`

public abstract static class LlmResponse.Builder extends Object
Builder for constructing `LlmResponse` instances.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Builder()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `abstract LlmResponse.Builder`
  `avgLogprobs(@Nullable Double avgLogprobs)`
  `LlmResponse`
  `build()`
  `abstract LlmResponse.Builder`
  `content(@Nullable com.google.genai.types.Content content)`
  `abstract LlmResponse.Builder`
  `customMetadata(@Nullable List<com.google.genai.types.CustomMetadata> customMetadata)`
  `abstract LlmResponse.Builder`
  `errorCode(@Nullable com.google.genai.types.FinishReason errorCode)`
  `abstract LlmResponse.Builder`
  `errorMessage(@Nullable String errorMessage)`
  `abstract LlmResponse.Builder`
  `finishReason(@Nullable com.google.genai.types.FinishReason finishReason)`
  `abstract LlmResponse.Builder`
  `groundingMetadata(@Nullable com.google.genai.types.GroundingMetadata groundingMetadata)`
  `abstract LlmResponse.Builder`
  `inputTranscription(@Nullable com.google.genai.types.Transcription inputTranscription)`
  `abstract LlmResponse.Builder`
  `interrupted(@Nullable Boolean interrupted)`
  `abstract LlmResponse.Builder`
  `modelVersion(@Nullable String modelVersion)`
  `abstract LlmResponse.Builder`
  `outputTranscription(@Nullable com.google.genai.types.Transcription outputTranscription)`
  `abstract LlmResponse.Builder`
  `partial(@Nullable Boolean partial)`
  `final LlmResponse.Builder`
  `response(com.google.genai.types.GenerateContentResponse response)`
  `abstract LlmResponse.Builder`
  `turnComplete(@Nullable Boolean turnComplete)`
  `abstract LlmResponse.Builder`
  `usageMetadata(@Nullable com.google.genai.types.GenerateContentResponseUsageMetadata usageMetadata)`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Builder

    public Builder()

- ## Method Details

  - ### content

    public abstract LlmResponse.Builder content(@Nullable com.google.genai.types.Content content)

  - ### interrupted

    public abstract LlmResponse.Builder interrupted(@Nullable Boolean interrupted)

  - ### groundingMetadata

    public abstract LlmResponse.Builder groundingMetadata(@Nullable com.google.genai.types.GroundingMetadata groundingMetadata)

  - ### customMetadata

    public abstract LlmResponse.Builder customMetadata(@Nullable List<com.google.genai.types.CustomMetadata> customMetadata)

  - ### partial

    public abstract LlmResponse.Builder partial(@Nullable Boolean partial)

  - ### turnComplete

    public abstract LlmResponse.Builder turnComplete(@Nullable Boolean turnComplete)

  - ### errorCode

    public abstract LlmResponse.Builder errorCode(@Nullable com.google.genai.types.FinishReason errorCode)

  - ### finishReason

    public abstract LlmResponse.Builder finishReason(@Nullable com.google.genai.types.FinishReason finishReason)

  - ### avgLogprobs

    public abstract LlmResponse.Builder avgLogprobs(@Nullable Double avgLogprobs)

  - ### errorMessage

    public abstract LlmResponse.Builder errorMessage(@Nullable String errorMessage)

  - ### usageMetadata

    public abstract LlmResponse.Builder usageMetadata(@Nullable com.google.genai.types.GenerateContentResponseUsageMetadata usageMetadata)

  - ### modelVersion

    public abstract LlmResponse.Builder modelVersion(@Nullable String modelVersion)

  - ### inputTranscription

    public abstract LlmResponse.Builder inputTranscription(@Nullable com.google.genai.types.Transcription inputTranscription)

  - ### outputTranscription

    public abstract LlmResponse.Builder outputTranscription(@Nullable com.google.genai.types.Transcription outputTranscription)

  - ### response

    @CanIgnoreReturnValue public final LlmResponse.Builder response(com.google.genai.types.GenerateContentResponse response)

  - ### build

    public LlmResponse build()