类的用途(Uses of the Class)
com.google.adk.agents.CallbackContext
Packages that use CallbackContext
Package
Description
-
**用途:** CallbackContext 在……里面;处于……状态 com.google.adk.agents
Methods in com.google.adk.agents with parameters of type CallbackContextModifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Maybe<com.google.genai.types.Content> Callbacks.AfterAgentCallback.call(CallbackContext callbackContext) 代理程序运行完成后,会触发异步回调函数。Optional<com.google.genai.types.Content> Callbacks.AfterAgentCallbackSync.call(CallbackContext callbackContext) io.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<com.google.genai.types.Content> Callbacks.BeforeAgentCallback.call(CallbackContext callbackContext) 在代理程序运行之前,会执行异步回调函数。Optional<com.google.genai.types.Content> Callbacks.BeforeAgentCallbackSync.call(CallbackContext callbackContext) 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) -
**用途:** CallbackContext 在……里面;处于……状态 com.google.adk.plugins
Methods in com.google.adk.plugins with parameters of type CallbackContextModifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Maybe<com.google.genai.types.Content> DebugLoggingPlugin.afterAgentCallback(BaseAgent agent, CallbackContext callbackContext) io.reactivex.rxjava3.core.Maybe<com.google.genai.types.Content> LoggingPlugin.afterAgentCallback(BaseAgent agent, CallbackContext callbackContext) default io.reactivex.rxjava3.core.Maybe<com.google.genai.types.Content> Plugin.afterAgentCallback(BaseAgent agent, CallbackContext callbackContext) 在代理程序的主要逻辑执行完成后,会触发该回调函数。io.reactivex.rxjava3.core.Maybe<com.google.genai.types.Content> PluginManager.afterAgentCallback(BaseAgent agent, CallbackContext callbackContext) io.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<com.google.genai.types.Content> DebugLoggingPlugin.beforeAgentCallback(BaseAgent agent, CallbackContext callbackContext) io.reactivex.rxjava3.core.Maybe<com.google.genai.types.Content> LoggingPlugin.beforeAgentCallback(BaseAgent agent, CallbackContext callbackContext) default io.reactivex.rxjava3.core.Maybe<com.google.genai.types.Content> Plugin.beforeAgentCallback(BaseAgent agent, CallbackContext callbackContext) 回调函数在代理程序的主要逻辑被执行之前被调用。io.reactivex.rxjava3.core.Maybe<com.google.genai.types.Content> PluginManager.beforeAgentCallback(BaseAgent agent, CallbackContext callbackContext) io.reactivex.rxjava3.core.Maybe<com.google.genai.types.Content> SaveFilesAsArtifactsPlugin.beforeAgentCallback(BaseAgent agent, CallbackContext callbackContext) 该功能用于报告从用户消息中保存的版本信息;这些版本信息是在第一个代理程序开始运行时被记录下来的。需要注意的是:插件无法直接为用户自己的事件添加额外的操作(即无法修改用户事件的处理流程)。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) Constructor parameters in com.google.adk.plugins with type arguments of type CallbackContextModifierConstructorDescriptionGlobalInstructionPlugin(Function<CallbackContext, io.reactivex.rxjava3.core.Maybe<String>> instructionProvider) GlobalInstructionPlugin(Function<CallbackContext, io.reactivex.rxjava3.core.Maybe<String>> instructionProvider, String name) -
**用途:** CallbackContext 在……里面;处于……状态 com.google.adk.plugins.agentanalytics
Methods in com.google.adk.plugins.agentanalytics with parameters of type CallbackContextModifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Maybe<com.google.genai.types.Content> BigQueryAgentAnalyticsPlugin.afterAgentCallback(BaseAgent agent, CallbackContext callbackContext) io.reactivex.rxjava3.core.Maybe<LlmResponse> BigQueryAgentAnalyticsPlugin.afterModelCallback(CallbackContext callbackContext, LlmResponse llmResponse) io.reactivex.rxjava3.core.Maybe<com.google.genai.types.Content> BigQueryAgentAnalyticsPlugin.beforeAgentCallback(BaseAgent agent, CallbackContext callbackContext) 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) -
**用途:** CallbackContext 在……里面;处于……状态 com.google.adk.tools
Subclasses of CallbackContext in com.google.adk.tools