类 ToolExecutor

java.lang.Object
top.aoyudi.deepseek.handler.ToolExecutor

public class ToolExecutor extends Object
工具执行器——调用executeTool手动执行
  • 字段详细资料

    • bean

      private final Object bean
      bean对象
    • method

      private final Method method
      方法
    • objectMapper

      private static final com.fasterxml.jackson.databind.ObjectMapper objectMapper
      序列化对象
  • 构造器详细资料

    • ToolExecutor

      public ToolExecutor()
  • 方法详细资料

    • executeTool

      public static Object executeTool(String name, String argumentsJson) throws Exception
      执行工具(请手动执行)
      参数:
      name - 方法名
      argumentsJson - 参数JSON
      返回:
      执行结果
      抛出:
      Exception - exception
    • parseArguments

      private static Object[] parseArguments(Method method, String json) throws Exception
      解析参数
      参数:
      method - 方法
      json - 参数JSON_String
      返回:
      参数 Object... args
      抛出:
      Exception