# Class ApigeeLlm

java.lang.Object
com.google.adk.models.BaseLlm
com.google.adk.models.ApigeeLlm

public class ApigeeLlm extends BaseLlm
A `BaseLlm` implementation for calling an Apigee proxy.

This class allows requests to be routed through an Apigee proxy. The model string format allows for specifying the provider (Gemini or Vertex AI), API version, and model ID.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `ApigeeLlm.Builder`
  Builder for `ApigeeLlm`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static ApigeeLlm.Builder`
  `builder()`
  Returns a new Builder for constructing `ApigeeLlm` instances.
  `BaseLlmConnection`
  `connect(LlmRequest llmRequest)`
  Creates a live connection to the LLM.
  `io.reactivex.rxjava3.core.Flowable<LlmResponse>`
  `generateContent(LlmRequest llmRequest, boolean stream)`
  Generates one content from the given LLM request and tools.

  ### Methods inherited from class BaseLlm

  `model`
  Modifier and Type
  Method
  Description
  `String`
  `model()`
  Returns the name of the LLM model.

  ### Methods inherited from class Object

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

- ## Method Details

  - ### builder

    public static ApigeeLlm.Builder builder()
    Returns a new Builder for constructing `ApigeeLlm` instances.
    Returns:
      a new `ApigeeLlm.Builder`

  - ### generateContent

    public io.reactivex.rxjava3.core.Flowable<LlmResponse> generateContent(LlmRequest llmRequest, boolean stream)
    Description copied from class: `BaseLlm`
    Generates one content from the given LLM request and tools.
    Specified by:
      `generateContent` in class `BaseLlm`
    Parameters:
      `llmRequest` - The LLM request containing the input prompt and parameters.
      `stream` - A boolean flag indicating whether to stream the response.
    Returns:
      A Flowable of LlmResponses. For non-streaming calls, it will only yield one LlmResponse. For streaming calls, it may yield more than one LlmResponse, but all yielded LlmResponses should be treated as one content by merging their parts.

  - ### connect

    public BaseLlmConnection connect(LlmRequest llmRequest)
    Description copied from class: `BaseLlm`
    Creates a live connection to the LLM.
    Specified by:
      `connect` in class `BaseLlm`