Class DefaultFunctionCallbackBuilder
java.lang.Object
org.springframework.ai.model.function.DefaultFunctionCallbackBuilder
- All Implemented Interfaces:
FunctionCallback.Builder
Default implementation of the
FunctionCallback.Builder
.- Since:
- 1.0.0
- Author:
- Christian Tzolov
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<I,
O> FunctionCallback.FunctionInvokingSpec<I, O> function
(String name, BiFunction<I, ToolContext, O> biFunction) Builds aBiFunction
invokingFunctionCallback
instance.Builds aConsumer
invokingFunctionCallback
instance.<I,
O> FunctionCallback.FunctionInvokingSpec<I, O> Builds aFunction
invokingFunctionCallback
instance.Builds aSupplier
invokingFunctionCallback
instance.Builds a Method invokingFunctionCallback
instance.
-
Constructor Details
-
DefaultFunctionCallbackBuilder
public DefaultFunctionCallbackBuilder()
-
-
Method Details
-
function
public <I,O> FunctionCallback.FunctionInvokingSpec<I,O> function(String name, Function<I, O> function) Description copied from interface:FunctionCallback.Builder
Builds aFunction
invokingFunctionCallback
instance.- Specified by:
function
in interfaceFunctionCallback.Builder
-
function
public <I,O> FunctionCallback.FunctionInvokingSpec<I,O> function(String name, BiFunction<I, ToolContext, O> biFunction) Description copied from interface:FunctionCallback.Builder
Builds aBiFunction
invokingFunctionCallback
instance.- Specified by:
function
in interfaceFunctionCallback.Builder
-
function
public <O> FunctionCallback.FunctionInvokingSpec<Void,O> function(String name, Supplier<O> supplier) Description copied from interface:FunctionCallback.Builder
Builds aSupplier
invokingFunctionCallback
instance.- Specified by:
function
in interfaceFunctionCallback.Builder
-
function
public <I> FunctionCallback.FunctionInvokingSpec<I,Void> function(String name, Consumer<I> consumer) Description copied from interface:FunctionCallback.Builder
Builds aConsumer
invokingFunctionCallback
instance.- Specified by:
function
in interfaceFunctionCallback.Builder
-
method
Description copied from interface:FunctionCallback.Builder
Builds a Method invokingFunctionCallback
instance.- Specified by:
method
in interfaceFunctionCallback.Builder
-