类:ComputerUseToolset

java.lang.Object
com.google.adk.tools.computeruse.ComputerUseToolset
All Implemented Interfaces:
BaseToolset, AutoCloseable

public class ComputerUseToolset extends Object implements BaseToolset
这是一套工具集,提供了使用计算机的各种功能。

它会自动检测并封装来自某个源(或库)的方法。 BaseComputer implementation.

  • 构造函数详细信息

    • ComputerUseToolset

      public ComputerUseToolset(BaseComputer computer)
    • ComputerUseToolset

      public ComputerUseToolset(BaseComputer computer, int[] virtualScreenSize)
  • 方法详细信息(Method Details)

    • getTools

      public io.reactivex.rxjava3.core.Flowable<BaseTool> getTools(ReadonlyContext readonlyContext)
      描述内容复制自接口文档: BaseToolset
      根据所提供的上下文,返回工具集中的所有工具。
      Specified by:
      getTools in interface BaseToolset
      Parameters:
      readonlyContext - Context used to filter tools available to the agent.
      Returns:
      A Flowable emitting tools available under the specified context.
    • close

      public void close() throws Exception
      描述内容复制自接口文档: BaseToolset
      执行清理操作,并释放工具集所占用的资源。

      注意:此方法会在代理服务器的生命周期结束时被调用,或者当工具集不再被需要时被调用。实现该功能时,必须确保所有打开的连接、文件以及其他被管理的资源都被正确释放,以防止资源泄漏。

      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface BaseToolset
      Throws:
      Exception
    • processLlmRequest

      public io.reactivex.rxjava3.core.Completable processLlmRequest(LlmRequest.Builder llmRequestBuilder, ToolContext toolContext)
      将计算机使用配置信息添加到大型语言模型(LLM)的请求中。
      Specified by:
      processLlmRequest in interface BaseToolset