# Uses of Class
com.google.adk.models.LlmResponse

Packages that use LlmResponse
Package
Description
com.google.adk.agents
com.google.adk.flows.llmflows
com.google.adk.models
com.google.adk.models.chat
com.google.adk.models.langchain4j
com.google.adk.models.springai
com.google.adk.plugins
com.google.adk.plugins.agentanalytics
com.google.adk.plugins.recordings
com.google.adk.telemetry

- ## Uses of LlmResponse in com.google.adk.agents

  Methods in com.google.adk.agents that return types with arguments of type LlmResponse
  Modifier and Type
  Method
  Description
  `io.reactivex.rxjava3.core.Maybe<LlmResponse>`
  Callbacks.AfterModelCallback.`call(CallbackContext callbackContext, LlmResponse llmResponse)`
  Async callback after LLM response.
  `Optional<LlmResponse>`
  Callbacks.AfterModelCallbackSync.`call(CallbackContext callbackContext, LlmResponse llmResponse)`
  `io.reactivex.rxjava3.core.Maybe<LlmResponse>`
  Callbacks.BeforeModelCallback.`call(CallbackContext callbackContext, LlmRequest.Builder llmRequestBuilder)`
  Async callback before LLM invocation.
  `Optional<LlmResponse>`
  Callbacks.BeforeModelCallbackSync.`call(CallbackContext callbackContext, LlmRequest.Builder llmRequestBuilder)`
  `io.reactivex.rxjava3.core.Maybe<LlmResponse>`
  Callbacks.OnModelErrorCallback.`call(CallbackContext callbackContext, LlmRequest llmRequest, Exception error)`
  Async callback when model call fails.
  `Optional<LlmResponse>`
  Callbacks.OnModelErrorCallbackSync.`call(CallbackContext callbackContext, LlmRequest llmRequest, Exception error)`
  Methods in com.google.adk.agents with parameters of type LlmResponse
  Modifier and Type
  Method
  Description
  `io.reactivex.rxjava3.core.Maybe<LlmResponse>`
  Callbacks.AfterModelCallback.`call(CallbackContext callbackContext, LlmResponse llmResponse)`
  Async callback after LLM response.
  `Optional<LlmResponse>`
  Callbacks.AfterModelCallbackSync.`call(CallbackContext callbackContext, LlmResponse llmResponse)`

- ## Uses of LlmResponse in com.google.adk.flows.llmflows

  Methods in com.google.adk.flows.llmflows that return LlmResponse
  Modifier and Type
  Method
  Description
  `abstract LlmResponse`
  ResponseProcessor.ResponseProcessingResult.`updatedResponse()`
  Updated LLM response.
  Methods in com.google.adk.flows.llmflows with parameters of type LlmResponse
  Modifier and Type
  Method
  Description
  `static ResponseProcessor.ResponseProcessingResult`
  ResponseProcessor.ResponseProcessingResult.`create(LlmResponse updatedResponse, Iterable<Event> events)`
  `static ResponseProcessor.ResponseProcessingResult`
  ResponseProcessor.ResponseProcessingResult.`create(LlmResponse updatedResponse, Iterable<Event> events, String transferToAgent)`
  `protected io.reactivex.rxjava3.core.Flowable<Event>`
  BaseLlmFlow.`postprocess(InvocationContext context, Event baseEventForLlmResponse, LlmRequest llmRequest, LlmResponse llmResponse, io.opentelemetry.context.Context parentContext)`
  Post-processes the LLM response after receiving it from the LLM.
  `io.reactivex.rxjava3.core.Single<ResponseProcessor.ResponseProcessingResult>`
  ResponseProcessor.`processResponse(InvocationContext context, LlmResponse response)`
  Process the LLM response as part of the post-processing stage.

- ## Uses of LlmResponse in com.google.adk.models

  Methods in com.google.adk.models that return LlmResponse
  Modifier and Type
  Method
  Description
  `LlmResponse`
  LlmResponse.Builder.`build()`
  `static LlmResponse`
  LlmResponse.`create(com.google.genai.types.GenerateContentResponse response)`
  `static LlmResponse`
  LlmResponse.`create(List<com.google.genai.types.Candidate> candidates)`
  Methods in com.google.adk.models that return types with arguments of type LlmResponse
  Modifier and Type
  Method
  Description
  `io.reactivex.rxjava3.core.Flowable<LlmResponse>`
  ApigeeLlm.`generateContent(LlmRequest llmRequest, boolean stream)`
  `abstract io.reactivex.rxjava3.core.Flowable<LlmResponse>`
  BaseLlm.`generateContent(LlmRequest llmRequest, boolean stream)`
  Generates one content from the given LLM request and tools.
  `io.reactivex.rxjava3.core.Flowable<LlmResponse>`
  Claude.`generateContent(LlmRequest llmRequest, boolean stream)`
  `io.reactivex.rxjava3.core.Flowable<LlmResponse>`
  Gemini.`generateContent(LlmRequest llmRequest, boolean stream)`
  `io.reactivex.rxjava3.core.Flowable<LlmResponse>`
  BaseLlmConnection.`receive()`
  Receives the model responses.
  `io.reactivex.rxjava3.core.Flowable<LlmResponse>`
  GeminiLlmConnection.`receive()`
  Methods in com.google.adk.models with parameters of type LlmResponse
  Modifier and Type
  Method
  Description
  `static Optional<com.google.genai.types.Part>`
  GeminiUtil.`getPart0FromLlmResponse(LlmResponse llmResponse)`
  Extracts the first part of an LlmResponse, if available.
  `static String`
  GeminiUtil.`getTextFromLlmResponse(LlmResponse llmResponse)`
  Extracts text content from the first part of an LlmResponse, if available.
  `static boolean`
  GeminiUtil.`shouldEmitAccumulatedText(LlmResponse currentLlmResponse)`
  Determines if accumulated text should be emitted based on the current LlmResponse.

- ## Uses of LlmResponse in com.google.adk.models.chat

  Methods in com.google.adk.models.chat that return types with arguments of type LlmResponse
  Modifier and Type
  Method
  Description
  `io.reactivex.rxjava3.core.Flowable<LlmResponse>`
  ChatCompletionsHttpClient.`complete(LlmRequest llmRequest, boolean stream)`
  Generates a conversational response from the chat completions endpoint based on the provided messages.

- ## Uses of LlmResponse in com.google.adk.models.langchain4j

  Methods in com.google.adk.models.langchain4j that return types with arguments of type LlmResponse
  Modifier and Type
  Method
  Description
  `io.reactivex.rxjava3.core.Flowable<LlmResponse>`
  LangChain4j.`generateContent(LlmRequest llmRequest, boolean stream)`

- ## Uses of LlmResponse in com.google.adk.models.springai

  Methods in com.google.adk.models.springai that return LlmResponse
  Modifier and Type
  Method
  Description
  `LlmResponse`
  StreamingResponseAggregator.`getFinalResponse()`
  Returns the final aggregated response and resets the aggregator.
  `LlmResponse`
  StreamingResponseAggregator.`processStreamingResponse(LlmResponse response)`
  Processes a streaming LlmResponse and returns the current aggregated state.
  `LlmResponse`
  MessageConverter.`toLlmResponse(org.springframework.ai.chat.model.ChatResponse chatResponse)`
  Converts a Spring AI ChatResponse to an ADK LlmResponse.
  `LlmResponse`
  MessageConverter.`toLlmResponse(org.springframework.ai.chat.model.ChatResponse chatResponse, boolean isStreaming)`
  Converts a Spring AI ChatResponse to an ADK LlmResponse with streaming context.
  Methods in com.google.adk.models.springai that return types with arguments of type LlmResponse
  Modifier and Type
  Method
  Description
  `io.reactivex.rxjava3.core.Flowable<LlmResponse>`
  SpringAI.`generateContent(LlmRequest llmRequest, boolean stream)`
  Methods in com.google.adk.models.springai with parameters of type LlmResponse
  Modifier and Type
  Method
  Description
  `LlmResponse`
  StreamingResponseAggregator.`processStreamingResponse(LlmResponse response)`
  Processes a streaming LlmResponse and returns the current aggregated state.

- ## Uses of LlmResponse in com.google.adk.plugins

  Methods in com.google.adk.plugins that return types with arguments of type LlmResponse
  Modifier and Type
  Method
  Description
  `io.reactivex.rxjava3.core.Maybe<LlmResponse>`
  LoggingPlugin.`afterModelCallback(CallbackContext callbackContext, LlmResponse llmResponse)`
  `default io.reactivex.rxjava3.core.Maybe<LlmResponse>`
  Plugin.`afterModelCallback(CallbackContext callbackContext, LlmResponse llmResponse)`
  Callback executed after a response is received from the model.
  `io.reactivex.rxjava3.core.Maybe<LlmResponse>`
  PluginManager.`afterModelCallback(CallbackContext callbackContext, LlmResponse llmResponse)`
  `io.reactivex.rxjava3.core.Maybe<LlmResponse>`
  ContextFilterPlugin.`beforeModelCallback(CallbackContext callbackContext, LlmRequest.Builder llmRequest)`
  Filters the LLM request context by trimming recent turns and applying any custom filter.
  `io.reactivex.rxjava3.core.Maybe<LlmResponse>`
  GlobalInstructionPlugin.`beforeModelCallback(CallbackContext callbackContext, LlmRequest.Builder llmRequest)`
  `io.reactivex.rxjava3.core.Maybe<LlmResponse>`
  LoggingPlugin.`beforeModelCallback(CallbackContext callbackContext, LlmRequest.Builder llmRequest)`
  `default io.reactivex.rxjava3.core.Maybe<LlmResponse>`
  Plugin.`beforeModelCallback(CallbackContext callbackContext, LlmRequest.Builder llmRequest)`
  Callback executed before a request is sent to the model.
  `io.reactivex.rxjava3.core.Maybe<LlmResponse>`
  PluginManager.`beforeModelCallback(CallbackContext callbackContext, LlmRequest.Builder llmRequest)`
  `io.reactivex.rxjava3.core.Maybe<LlmResponse>`
  ReplayPlugin.`beforeModelCallback(CallbackContext callbackContext, LlmRequest.Builder llmRequest)`
  `io.reactivex.rxjava3.core.Maybe<LlmResponse>`
  LoggingPlugin.`onModelErrorCallback(CallbackContext callbackContext, LlmRequest.Builder llmRequest, Throwable error)`
  `default io.reactivex.rxjava3.core.Maybe<LlmResponse>`
  Plugin.`onModelErrorCallback(CallbackContext callbackContext, LlmRequest.Builder llmRequest, Throwable error)`
  Callback executed when a model call encounters an error.
  `io.reactivex.rxjava3.core.Maybe<LlmResponse>`
  PluginManager.`onModelErrorCallback(CallbackContext callbackContext, LlmRequest.Builder llmRequest, Throwable error)`
  Methods in com.google.adk.plugins with parameters of type LlmResponse
  Modifier and Type
  Method
  Description
  `io.reactivex.rxjava3.core.Maybe<LlmResponse>`
  LoggingPlugin.`afterModelCallback(CallbackContext callbackContext, LlmResponse llmResponse)`
  `default io.reactivex.rxjava3.core.Maybe<LlmResponse>`
  Plugin.`afterModelCallback(CallbackContext callbackContext, LlmResponse llmResponse)`
  Callback executed after a response is received from the model.
  `io.reactivex.rxjava3.core.Maybe<LlmResponse>`
  PluginManager.`afterModelCallback(CallbackContext callbackContext, LlmResponse llmResponse)`

- ## Uses of LlmResponse in com.google.adk.plugins.agentanalytics

  Methods in com.google.adk.plugins.agentanalytics that return types with arguments of type LlmResponse
  Modifier and Type
  Method
  Description
  `io.reactivex.rxjava3.core.Maybe<LlmResponse>`
  BigQueryAgentAnalyticsPlugin.`afterModelCallback(CallbackContext callbackContext, LlmResponse llmResponse)`
  `io.reactivex.rxjava3.core.Maybe<LlmResponse>`
  BigQueryAgentAnalyticsPlugin.`beforeModelCallback(CallbackContext callbackContext, LlmRequest.Builder llmRequest)`
  Callback before LLM call.
  `io.reactivex.rxjava3.core.Maybe<LlmResponse>`
  BigQueryAgentAnalyticsPlugin.`onModelErrorCallback(CallbackContext callbackContext, LlmRequest.Builder llmRequest, Throwable error)`
  Methods in com.google.adk.plugins.agentanalytics with parameters of type LlmResponse
  Modifier and Type
  Method
  Description
  `io.reactivex.rxjava3.core.Maybe<LlmResponse>`
  BigQueryAgentAnalyticsPlugin.`afterModelCallback(CallbackContext callbackContext, LlmResponse llmResponse)`

- ## Uses of LlmResponse in com.google.adk.plugins.recordings

  Methods in com.google.adk.plugins.recordings that return types with arguments of type LlmResponse
  Modifier and Type
  Method
  Description
  `abstract Optional<List<LlmResponse>>`
  LlmRecording.`llmResponses()`
  The LLM responses.
  Method parameters in com.google.adk.plugins.recordings with type arguments of type LlmResponse
  Modifier and Type
  Method
  Description
  `abstract LlmRecording.Builder`
  LlmRecording.Builder.`llmResponses(List<LlmResponse> llmResponses)`

- ## Uses of LlmResponse in com.google.adk.telemetry

  Methods in com.google.adk.telemetry with parameters of type LlmResponse
  Modifier and Type
  Method
  Description
  `static void`
  Tracing.`traceCallLlm(io.opentelemetry.api.trace.Span span, InvocationContext invocationContext, String eventId, LlmRequest llmRequest, LlmResponse llmResponse, @Nullable Exception error)`
  Traces a call to the LLM.