Package org.springframework.ai.tool
Interface ToolCallback
- All Superinterfaces:
FunctionCallback
- All Known Implementing Classes:
FunctionToolCallback
,MethodToolCallback
Represents a tool whose execution can be triggered by an AI model.
- Since:
- 1.0.0
- Author:
- Thomas Vitale
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.ai.model.function.FunctionCallback
FunctionCallback.Builder, FunctionCallback.CommonCallbackInvokingSpec<B extends FunctionCallback.CommonCallbackInvokingSpec<B>>, FunctionCallback.FunctionInvokingSpec<I,
O>, FunctionCallback.MethodInvokingSpec, FunctionCallback.SchemaType -
Method Summary
Modifier and TypeMethodDescriptiondefault String
Deprecated.default String
Deprecated.default String
getName()
Deprecated.Definition used by the AI model to determine when and how to call the tool.default ToolMetadata
Metadata providing additional information on how to handle the tool.Methods inherited from interface org.springframework.ai.model.function.FunctionCallback
call, call
-
Method Details
-
getToolDefinition
ToolDefinition getToolDefinition()Definition used by the AI model to determine when and how to call the tool. -
getToolMetadata
Metadata providing additional information on how to handle the tool. -
getName
Deprecated.- Specified by:
getName
in interfaceFunctionCallback
- Returns:
- Returns the Function name. Unique within the model.
-
getDescription
Deprecated.- Specified by:
getDescription
in interfaceFunctionCallback
- Returns:
- Returns the function description. This description is used by the model do decide if the function should be called or not.
-
getInputTypeSchema
Deprecated.- Specified by:
getInputTypeSchema
in interfaceFunctionCallback
- Returns:
- Returns the JSON schema of the function input type.
-