Package dev.langchain4j.agent.tool
Class ToolExecutionRequestUtil
java.lang.Object
dev.langchain4j.agent.tool.ToolExecutionRequestUtil
Utility class for
ToolExecutionRequest.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Targument(ToolExecutionRequest toolExecutionRequest, String name) Get an argument value from ToolExecutionRequest.argumentsAsMap(String arguments) Convert arguments to map.
-
Field Details
-
GSON
public static final com.google.gson.Gson GSONGson instance. -
MAP_TYPE
UtilityTypeTokendescribingMap<String, Object>.
-
-
Method Details
-
argument
Get an argument value from ToolExecutionRequest.- Type Parameters:
T- the argument type- Parameters:
toolExecutionRequest- requestname- argument name- Returns:
- argument value
-
argumentsAsMap
Convert arguments to map.- Parameters:
arguments- json string- Returns:
- map
-