类的用途(Uses of the Class)
com.google.adk.models.LlmResponse
Packages that use LlmResponse
Package
Description
-
**用途:** LlmResponse 在……里面;处于……状态 com.google.adk.agents
Methods in com.google.adk.agents that return types with arguments of type LlmResponseModifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Maybe<LlmResponse> Callbacks.AfterModelCallback.call(CallbackContext callbackContext, LlmResponse llmResponse) 在大型语言模型(LLM)返回结果后,会触发一个异步回调函数。Callbacks.AfterModelCallbackSync.call(CallbackContext callbackContext, LlmResponse llmResponse) io.reactivex.rxjava3.core.Maybe<LlmResponse> Callbacks.BeforeModelCallback.call(CallbackContext callbackContext, LlmRequest.Builder llmRequestBuilder) 在调用大型语言模型(LLM)之前,需要执行异步回调函数。Callbacks.BeforeModelCallbackSync.call(CallbackContext callbackContext, LlmRequest.Builder llmRequestBuilder) io.reactivex.rxjava3.core.Maybe<LlmResponse> Callbacks.OnModelErrorCallback.call(CallbackContext callbackContext, LlmRequest llmRequest, Exception error) 当模型调用失败时,会触发异步回调函数。Callbacks.OnModelErrorCallbackSync.call(CallbackContext callbackContext, LlmRequest llmRequest, Exception error) Methods in com.google.adk.agents with parameters of type LlmResponseModifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Maybe<LlmResponse> Callbacks.AfterModelCallback.call(CallbackContext callbackContext, LlmResponse llmResponse) 在大型语言模型(LLM)返回结果后,会触发一个异步回调函数。Callbacks.AfterModelCallbackSync.call(CallbackContext callbackContext, LlmResponse llmResponse) -
**用途:** LlmResponse 在……里面;处于……状态 com.google.adk.flows.llmflows
Methods in com.google.adk.flows.llmflows that return LlmResponseModifier and TypeMethodDescriptionabstract LlmResponseResponseProcessor.ResponseProcessingResult.updatedResponse()更新后的大型语言模型(LLM)响应。Methods in com.google.adk.flows.llmflows with parameters of type LlmResponseModifier and TypeMethodDescriptionResponseProcessor.ResponseProcessingResult.create(LlmResponse updatedResponse, Iterable<Event> events) 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) 在从大型语言模型(LLM)接收到响应后,会对该响应进行后处理。io.reactivex.rxjava3.core.Single<ResponseProcessor.ResponseProcessingResult> ResponseProcessor.processResponse(InvocationContext context, LlmResponse response) 将大型语言模型(LLM)的响应作为后处理阶段的一部分进行处理。 -
**用途:** LlmResponse 在……里面;处于……状态 com.google.adk.models
Methods in com.google.adk.models that return LlmResponseModifier and TypeMethodDescriptionLlmResponse.Builder.build()static LlmResponseLlmResponse.create(com.google.genai.types.GenerateContentResponse response) static LlmResponseMethods in com.google.adk.models that return types with arguments of type LlmResponseModifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Flowable<LlmResponse> ApigeeLlm.generateContent(LlmRequest llmRequest, boolean stream) abstract io.reactivex.rxjava3.core.Flowable<LlmResponse> BaseLlm.generateContent(LlmRequest llmRequest, boolean stream) 根据给定的大型语言模型(LLM)请求及相关工具,生成一条内容。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()接收模型的响应结果。io.reactivex.rxjava3.core.Flowable<LlmResponse> GeminiLlmConnection.receive()Methods in com.google.adk.models with parameters of type LlmResponseModifier and TypeMethodDescriptionstatic Optional<com.google.genai.types.Part> GeminiUtil.getPart0FromLlmResponse(LlmResponse llmResponse) 如果存在的话,会提取 LlmResponse 对象的第一部分内容。static StringGeminiUtil.getTextFromLlmResponse(LlmResponse llmResponse) 如果 `LlmResponse` 中包含第一部分内容,则从中提取文本。static booleanGeminiUtil.shouldEmitAccumulatedText(LlmResponse currentLlmResponse) 根据当前的 LlmResponse,判断是否应该输出累积起来的文本。 -
**用途:** LlmResponse 在……里面;处于……状态 com.google.adk.models.chat
Methods in com.google.adk.models.chat that return types with arguments of type LlmResponseModifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Flowable<LlmResponse> ChatCompletionsClient.complete(LlmRequest llmRequest, boolean stream) 根据提供的消息,从聊天完成(chat completions)端点生成对话式响应。io.reactivex.rxjava3.core.Flowable<LlmResponse> ChatCompletionsHttpClient.complete(LlmRequest llmRequest, boolean stream) -
**用途:** LlmResponse 在……里面;处于……状态 com.google.adk.models.langchain4j
Methods in com.google.adk.models.langchain4j that return types with arguments of type LlmResponseModifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Flowable<LlmResponse> LangChain4j.generateContent(LlmRequest llmRequest, boolean stream) -
**用途:** LlmResponse 在……里面;处于……状态 com.google.adk.models.springai
Methods in com.google.adk.models.springai that return LlmResponseModifier and TypeMethodDescriptionStreamingResponseAggregator.getFinalResponse()返回最终的聚合响应结果,并重置聚合器(aggregator)。StreamingResponseAggregator.processStreamingResponse(LlmResponse response) 处理流式 LLMResponse 数据,并返回当前的聚合状态。MessageConverter.toLlmResponse(@Nullable org.springframework.ai.chat.model.ChatResponse chatResponse) 将 Spring AI 的 ChatResponse 对象转换为 ADK 的 LlmResponse 对象。MessageConverter.toLlmResponse(@Nullable org.springframework.ai.chat.model.ChatResponse chatResponse, boolean isStreaming) 将 Spring AI 的 ChatResponse 转换为具有流式处理功能的 ADK LlmResponse。Methods in com.google.adk.models.springai that return types with arguments of type LlmResponseModifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Flowable<LlmResponse> SpringAI.generateContent(LlmRequest llmRequest, boolean stream) Methods in com.google.adk.models.springai with parameters of type LlmResponseModifier and TypeMethodDescriptionStreamingResponseAggregator.processStreamingResponse(LlmResponse response) 处理流式 LLMResponse 数据,并返回当前的聚合状态。org.springframework.ai.chat.model.ChatResponseMessageConverter.toChatResponse(@Nullable LlmResponse llmResponse) 将 ADK 转换为其他格式或用途。LlmResponse发送到 Spring AIChatResponse. -
**用途:** LlmResponse 在……里面;处于……状态 com.google.adk.plugins
Methods in com.google.adk.plugins that return types with arguments of type LlmResponseModifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Maybe<LlmResponse> DebugLoggingPlugin.afterModelCallback(CallbackContext callbackContext, LlmResponse llmResponse) 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) 在从模型接收到响应后,会执行该回调函数。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) 通过删除最近的对话记录,并应用任何自定义过滤规则,来过滤大型语言模型(LLM)的请求上下文。io.reactivex.rxjava3.core.Maybe<LlmResponse> DebugLoggingPlugin.beforeModelCallback(CallbackContext callbackContext, LlmRequest.Builder llmRequest) 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) 在请求被发送到模型之前,会先执行这个回调函数。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> DebugLoggingPlugin.onModelErrorCallback(CallbackContext callbackContext, LlmRequest.Builder llmRequest, Throwable error) 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) 当模型调用遇到错误时,会执行此回调函数。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 LlmResponseModifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Maybe<LlmResponse> DebugLoggingPlugin.afterModelCallback(CallbackContext callbackContext, LlmResponse llmResponse) 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) 在从模型接收到响应后,会执行该回调函数。io.reactivex.rxjava3.core.Maybe<LlmResponse> PluginManager.afterModelCallback(CallbackContext callbackContext, LlmResponse llmResponse) -
**用途:** LlmResponse 在……里面;处于……状态 com.google.adk.plugins.agentanalytics
Methods in com.google.adk.plugins.agentanalytics that return types with arguments of type LlmResponseModifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Maybe<LlmResponse> BigQueryAgentAnalyticsPlugin.afterModelCallback(CallbackContext callbackContext, LlmResponse llmResponse) io.reactivex.rxjava3.core.Maybe<LlmResponse> BigQueryAgentAnalyticsPlugin.beforeModelCallback(CallbackContext callbackContext, LlmRequest.Builder llmRequest) 在调用大型语言模型(LLM)之前执行的回调函数。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 LlmResponseModifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Maybe<LlmResponse> BigQueryAgentAnalyticsPlugin.afterModelCallback(CallbackContext callbackContext, LlmResponse llmResponse) -
**用途:** LlmResponse 在……里面;处于……状态 com.google.adk.plugins.recordings
Methods in com.google.adk.plugins.recordings that return types with arguments of type LlmResponseModifier and TypeMethodDescriptionabstract Optional<List<LlmResponse>> LlmRecording.llmResponses()大型语言模型(LLM)的回答。Method parameters in com.google.adk.plugins.recordings with type arguments of type LlmResponseModifier and TypeMethodDescriptionabstract LlmRecording.BuilderLlmRecording.Builder.llmResponses(@Nullable List<LlmResponse> llmResponses) -
**用途:** LlmResponse 在……里面;处于……状态 com.google.adk.telemetry
Methods in com.google.adk.telemetry with parameters of type LlmResponseModifier and TypeMethodDescriptionstatic voidTracing.traceCallLlm(io.opentelemetry.api.trace.Span span, InvocationContext invocationContext, String eventId, LlmRequest llmRequest, LlmResponse llmResponse, @Nullable Exception error) 记录对大型语言模型(LLM)的调用过程。