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

Packages that use LlmRequest
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.recordings
com.google.adk.telemetry

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

  Methods in com.google.adk.agents with parameters of type LlmRequest
  Modifier and Type
  Method
  Description
  `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)`

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

  Methods in com.google.adk.flows.llmflows that return LlmRequest
  Modifier and Type
  Method
  Description
  `abstract LlmRequest`
  RequestProcessor.RequestProcessingResult.`updatedRequest()`
  Updated LLM request.
  Methods in com.google.adk.flows.llmflows with parameters of type LlmRequest
  Modifier and Type
  Method
  Description
  `static RequestProcessor.RequestProcessingResult`
  RequestProcessor.RequestProcessingResult.`create(LlmRequest updatedRequest, Iterable<Event> events)`
  Creates a new `RequestProcessor.RequestProcessingResult`.
  `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<RequestProcessor.RequestProcessingResult>`
  AgentTransfer.`processRequest(InvocationContext context, LlmRequest request)`
  `io.reactivex.rxjava3.core.Single<RequestProcessor.RequestProcessingResult>`
  Basic.`processRequest(InvocationContext context, LlmRequest request)`
  `io.reactivex.rxjava3.core.Single<RequestProcessor.RequestProcessingResult>`
  Compaction.`processRequest(InvocationContext context, LlmRequest request)`
  `io.reactivex.rxjava3.core.Single<RequestProcessor.RequestProcessingResult>`
  Contents.`processRequest(InvocationContext context, LlmRequest request)`
  `io.reactivex.rxjava3.core.Single<RequestProcessor.RequestProcessingResult>`
  Identity.`processRequest(InvocationContext context, LlmRequest request)`
  `io.reactivex.rxjava3.core.Single<RequestProcessor.RequestProcessingResult>`
  Instructions.`processRequest(InvocationContext context, LlmRequest request)`
  `io.reactivex.rxjava3.core.Single<RequestProcessor.RequestProcessingResult>`
  OutputSchema.`processRequest(InvocationContext context, LlmRequest request)`
  `io.reactivex.rxjava3.core.Single<RequestProcessor.RequestProcessingResult>`
  RequestConfirmationLlmRequestProcessor.`processRequest(InvocationContext invocationContext, LlmRequest llmRequest)`
  `io.reactivex.rxjava3.core.Single<RequestProcessor.RequestProcessingResult>`
  RequestProcessor.`processRequest(InvocationContext context, LlmRequest request)`
  Process the LLM request as part of the pre-processing stage.

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

  Methods in com.google.adk.models that return LlmRequest
  Modifier and Type
  Method
  Description
  `abstract LlmRequest`
  LlmRequest.Builder.`build()`
  `static LlmRequest`
  GeminiUtil.`prepareGenenerateContentRequest(LlmRequest llmRequest, boolean sanitize)`
  Prepares an `LlmRequest` for the GenerateContent API.
  `static LlmRequest`
  GeminiUtil.`prepareGenenerateContentRequest(LlmRequest llmRequest, boolean sanitize, boolean stripThoughts)`
  Prepares an `LlmRequest` for the GenerateContent API.
  `static LlmRequest`
  GeminiUtil.`removeClientFunctionCallId(LlmRequest llmRequest)`
  Removes client-side function call IDs from the request.
  `static LlmRequest`
  GeminiUtil.`sanitizeRequestForGeminiApi(LlmRequest llmRequest)`
  Sanitizes the request to ensure it is compatible with the Gemini API backend.
  Methods in com.google.adk.models with parameters of type LlmRequest
  Modifier and Type
  Method
  Description
  `BaseLlmConnection`
  ApigeeLlm.`connect(LlmRequest llmRequest)`
  `abstract BaseLlmConnection`
  BaseLlm.`connect(LlmRequest llmRequest)`
  Creates a live connection to the LLM.
  `BaseLlmConnection`
  Claude.`connect(LlmRequest llmRequest)`
  `BaseLlmConnection`
  Gemini.`connect(LlmRequest llmRequest)`
  `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)`
  `static LlmRequest`
  GeminiUtil.`prepareGenenerateContentRequest(LlmRequest llmRequest, boolean sanitize)`
  Prepares an `LlmRequest` for the GenerateContent API.
  `static LlmRequest`
  GeminiUtil.`prepareGenenerateContentRequest(LlmRequest llmRequest, boolean sanitize, boolean stripThoughts)`
  Prepares an `LlmRequest` for the GenerateContent API.
  `static LlmRequest`
  GeminiUtil.`removeClientFunctionCallId(LlmRequest llmRequest)`
  Removes client-side function call IDs from the request.
  `static LlmRequest`
  GeminiUtil.`sanitizeRequestForGeminiApi(LlmRequest llmRequest)`
  Sanitizes the request to ensure it is compatible with the Gemini API backend.

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

  Methods in com.google.adk.models.chat with parameters of type LlmRequest
  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.
  `static ChatCompletionsRequest`
  ChatCompletionsRequest.`fromLlmRequest(LlmRequest llmRequest, boolean responseStreaming)`
  Converts a standard `LlmRequest` into a `ChatCompletionsRequest` for /chat/completions compatible endpoints.

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

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

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

  Methods in com.google.adk.models.springai with parameters of type LlmRequest
  Modifier and Type
  Method
  Description
  `BaseLlmConnection`
  SpringAI.`connect(LlmRequest llmRequest)`
  `io.reactivex.rxjava3.core.Flowable<LlmResponse>`
  SpringAI.`generateContent(LlmRequest llmRequest, boolean stream)`
  `Map<String, ToolConverter.ToolMetadata>`
  MessageConverter.`getToolRegistry(LlmRequest llmRequest)`
  Gets tool registry from ADK tools for internal tracking.
  `org.springframework.ai.chat.prompt.Prompt`
  MessageConverter.`toLlmPrompt(LlmRequest llmRequest)`
  Converts an ADK LlmRequest to a Spring AI Prompt.

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

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

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

  Methods in com.google.adk.telemetry with parameters of type LlmRequest
  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.