Interface LLMTool
- All Superinterfaces:
Identifiable<String>
The
LLMTool interface represents a programmatic tool
designed to be consumed by an LLM.- Author:
- Miguel Álvarez Díez - Initial contribution
-
Method Summary
Modifier and TypeMethodDescriptionInvoke the tool implementation.getDescription(@Nullable Locale locale) Returns a localized human-readable description of the tool.Returns a localized human-readable label that can be used within UIs.getParamDescriptions(@Nullable Locale locale) Returns a localizedLLMToolParamlist with human-readable descriptions of the tool parameters.getShortDescription(@Nullable Locale locale) Returns a short localized human-readable description of the tool.getUID()Returns a simple string that uniquely identifies this service.
-
Method Details
-
getUID
String getUID()Returns a simple string that uniquely identifies this service.- Specified by:
getUIDin interfaceIdentifiable<String>- Returns:
- an id that identifies this service
-
getLabel
Returns a localized human-readable label that can be used within UIs.- Parameters:
locale- the locale to provide the label for- Returns:
- a localized string to be used in UIs
-
getShortDescription
Returns a short localized human-readable description of the tool.- Parameters:
locale- the locale to provide the label for- Returns:
- a localized string that shortly describes the tool purpose
-
getDescription
Returns a localized human-readable description of the tool.- Parameters:
locale- the locale to provide the label for- Returns:
- a localized string to be feed to an LLM
-
getParamDescriptions
Returns a localizedLLMToolParamlist with human-readable descriptions of the tool parameters.- Parameters:
locale- the locale to provide the label for- Returns:
- localized descriptions of the tool params
-
call
Invoke the tool implementation.- Parameters:
params- a map of parameter names and values- Returns:
- the tool result
- Throws:
LLMToolException- when invocation of the tool implementation failed
-