java.lang.Object
com.mulesoft.modules.agent.broker.internal.util.ToolUtils

public final class ToolUtils extends Object
  • Field Details

    • DEFAULT_TOOL_METADATA_EXPIRY

      public static final Duration DEFAULT_TOOL_METADATA_EXPIRY
  • Method Details

    • generateToolId

      public static String generateToolId(String configName, String toolName)
    • newToolCache

      public static <K, V> com.github.benmanes.caffeine.cache.Cache<K,V> newToolCache()
    • newToolCache

      public static <K, V> com.github.benmanes.caffeine.cache.Cache<K,V> newToolCache(Duration expiry)
    • randomToolCallId

      public static String randomToolCallId()
    • randomString

      public static String randomString(int length)
    • newToolCache

      public static <K, V> com.github.benmanes.caffeine.cache.LoadingCache<K,V> newToolCache(Function<K,V> loader, Duration expiry)
    • openAiLLMOutputSchema

      public static Map<String,com.openai.core.JsonValue> openAiLLMOutputSchema()
    • toOpenAiToolSchema

      public static Map<String,com.openai.core.JsonValue> toOpenAiToolSchema(String schema) throws com.fasterxml.jackson.core.JsonProcessingException
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException
    • toOpenAiToolSchema

      public static Map<String,com.openai.core.JsonValue> toOpenAiToolSchema(com.fasterxml.jackson.databind.node.ObjectNode schemaRoot) throws com.fasterxml.jackson.core.JsonProcessingException
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException