# Class LlmRequest.Builder

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

Enclosing class:
  `LlmRequest`

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

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Builder()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `final LlmRequest.Builder`
  `appendInstructions(List<String> instructions)`
  `final LlmRequest.Builder`
  `appendTools(List<BaseTool> tools)`
  `abstract LlmRequest`
  `build()`
  `abstract Optional<com.google.genai.types.GenerateContentConfig>`
  `config()`
  `abstract LlmRequest.Builder`
  `config(com.google.genai.types.GenerateContentConfig config)`
  `abstract LlmRequest.Builder`
  `contents(List<com.google.genai.types.Content> contents)`
  `abstract LlmRequest.Builder`
  `liveConnectConfig(com.google.genai.types.LiveConnectConfig liveConnectConfig)`
  `abstract LlmRequest.Builder`
  `model(String model)`
  `final LlmRequest.Builder`
  `outputSchema(com.google.genai.types.Schema schema)`
  Sets the output schema for the LLM response.
  `abstract LlmRequest.Builder`
  `tools(Map<String,BaseTool> tools)`

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### Builder

    public Builder()

- ## Method Details

  - ### model

    @CanIgnoreReturnValue public abstract LlmRequest.Builder model(String model)

  - ### contents

    @CanIgnoreReturnValue public abstract LlmRequest.Builder contents(List<com.google.genai.types.Content> contents)

  - ### config

    @CanIgnoreReturnValue public abstract LlmRequest.Builder config(com.google.genai.types.GenerateContentConfig config)

  - ### config

    public abstract Optional<com.google.genai.types.GenerateContentConfig> config()

  - ### liveConnectConfig

    @CanIgnoreReturnValue public abstract LlmRequest.Builder liveConnectConfig(com.google.genai.types.LiveConnectConfig liveConnectConfig)

  - ### tools

    @CanIgnoreReturnValue public abstract LlmRequest.Builder tools(Map<String,BaseTool> tools)

  - ### appendInstructions

    @CanIgnoreReturnValue public final LlmRequest.Builder appendInstructions(List<String> instructions)

  - ### appendTools

    @CanIgnoreReturnValue public final LlmRequest.Builder appendTools(List<BaseTool> tools)

  - ### outputSchema

    @CanIgnoreReturnValue public final LlmRequest.Builder outputSchema(com.google.genai.types.Schema schema)
    Sets the output schema for the LLM response. If set, The output content will always be a JSON string that conforms to the schema.

  - ### build

    public abstract LlmRequest build()