Class KernelFunctionFromMethod.Builder<T>
- java.lang.Object
-
- com.microsoft.semantickernel.semanticfunctions.KernelFunctionFromMethod.Builder<T>
-
- Enclosing class:
- KernelFunctionFromMethod<T>
public static class KernelFunctionFromMethod.Builder<T> extends Object
A builder forKernelFunction.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KernelFunction<T>build()Builds a new instance ofKernelFunction.KernelFunctionFromMethod.Builder<T>withDescription(String description)Sets the description to use to build the function.KernelFunctionFromMethod.Builder<T>withFunctionName(String functionName)Sets the function name to use to build the function.KernelFunctionFromMethod.Builder<T>withMethod(Method method)Sets the method to use to build the function.KernelFunctionFromMethod.Builder<T>withParameters(List<InputVariable> parameters)Sets the parameters to use to build the function.KernelFunctionFromMethod.Builder<T>withPluginName(String pluginName)Sets the plugin name to use to build the function.KernelFunctionFromMethod.Builder<T>withReturnParameter(OutputVariable<?> returnParameter)Sets the return parameter to use to build the function.KernelFunctionFromMethod.Builder<T>withTarget(Object target)Sets the target to use to build the function.
-
-
-
Method Detail
-
withMethod
public KernelFunctionFromMethod.Builder<T> withMethod(Method method)
Sets the method to use to build the function.- Parameters:
method- the method to use- Returns:
- this instance of the
KernelFunctionFromMethod.Builderclass
-
withTarget
public KernelFunctionFromMethod.Builder<T> withTarget(Object target)
Sets the target to use to build the function.- Parameters:
target- the target to use- Returns:
- this instance of the
KernelFunctionFromMethod.Builderclass
-
withPluginName
public KernelFunctionFromMethod.Builder<T> withPluginName(String pluginName)
Sets the plugin name to use to build the function.- Parameters:
pluginName- the plugin name to use- Returns:
- this instance of the
KernelFunctionFromMethod.Builderclass
-
withFunctionName
public KernelFunctionFromMethod.Builder<T> withFunctionName(String functionName)
Sets the function name to use to build the function.- Parameters:
functionName- the function name to use- Returns:
- this instance of the
KernelFunctionFromMethod.Builderclass
-
withDescription
public KernelFunctionFromMethod.Builder<T> withDescription(String description)
Sets the description to use to build the function.- Parameters:
description- the description to use- Returns:
- this instance of the
KernelFunctionFromMethod.Builderclass
-
withParameters
public KernelFunctionFromMethod.Builder<T> withParameters(List<InputVariable> parameters)
Sets the parameters to use to build the function.- Parameters:
parameters- the parameters to use- Returns:
- this instance of the
KernelFunctionFromMethod.Builderclass
-
withReturnParameter
public KernelFunctionFromMethod.Builder<T> withReturnParameter(OutputVariable<?> returnParameter)
Sets the return parameter to use to build the function.- Parameters:
returnParameter- the return parameter to use- Returns:
- this instance of the
KernelFunctionFromMethod.Builderclass
-
build
public KernelFunction<T> build()
Builds a new instance ofKernelFunction.- Returns:
- a new instance of
KernelFunction
-
-