Class ToolUtils
java.lang.Object
com.mulesoft.modules.agent.broker.internal.util.ToolUtils
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgenerateToolId(String configName, String toolName) static <K,V> com.github.benmanes.caffeine.cache.Cache<K, V> static <K,V> com.github.benmanes.caffeine.cache.Cache<K, V> newToolCache(Duration expiry) static <K,V> com.github.benmanes.caffeine.cache.LoadingCache<K, V> newToolCache(Function<K, V> loader, Duration expiry) static StringrandomString(int length) static StringtoOpenAiToolSchema(com.fasterxml.jackson.databind.node.ObjectNode schemaRoot) toOpenAiToolSchema(String schema)
-
Field Details
-
DEFAULT_TOOL_METADATA_EXPIRY
-
-
Method Details
-
generateToolId
-
newToolCache
public static <K,V> com.github.benmanes.caffeine.cache.Cache<K,V> newToolCache() -
newToolCache
-
randomToolCallId
-
randomString
-
newToolCache
-
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
-