保存文件正如……所提到的那样;正如……所表明的那样。工件(Artifacts)插件(Plugin)
Saves files attached to user messages as artifacts, replacing each with a placeholder that names the artifact so agents can load it later, such as with LoadArtifactsTool. Each file is saved under its display name, where a user: prefix shares it across the user's sessions, or under a generated name if it has no display name; files over 20 MB are replaced with an error note instead. Mirrors Python ADK's SaveFilesAsArtifactsPlugin.
Parameters
Whether to also attach a FileData reference to each saved file when the artifact service stores it at a URI the model can read (gs, https or http).
构造函数(Constructors)
函数
当某个特定的代理完成其处理任务后,会执行相应的回调函数。
在接收到大型语言模型(LLM)的响应后,会执行该回调函数。
回调函数在 ADK 运行器完成执行后,或者调用者提前停止数据收集后(例如由于某种原因)被执行。 first() 或者 take(n))或者它的收集器抛出异常(exception)。
该功能会报告从用户消息中保存下来的版本信息;这些版本信息是在第一个代理程序开始运行时被记录下来的。需要注意的是,由于插件无法直接对用户自己的事件(即用户自己创建的事件)进行操作或添加额外的功能,因此这些版本信息仅适用于那些由系统自动触发的事件(例如第一个代理程序的启动)。
回调函数在向大型语言模型(LLM)发送请求之前被执行。
回调函数在 ADK 运行器开始执行主循环之前被调用。
回调函数在工具被调用之前执行。
当代理在执行过程中触发某个事件时,会执行此回调函数。
当在大型语言模型(LLM)的交互过程中发生错误时,会执行此回调函数。
当 ADK 运行器运行失败时,或者在其他特定情况下,会执行此回调函数。 afterRun 在调用者提前停止数据收集后,程序会失败(即无法继续执行)。
当工具调用过程中发生错误时,会执行此回调函数。
当在调用开始之前接收到用户消息时,会执行此回调函数。