Share via


KernelFunctionFromMethod.Builder<T> Class

  • java.lang.Object
    • com.microsoft.semantickernel.semanticfunctions.KernelFunctionFromMethod.Builder<T>

Type Parameters

T

the return type of the function

public static class KernelFunctionFromMethod.Builder<T>

A builder for KernelFunction<T>.

Constructor Summary

Constructor Description
Builder()

Method Summary

Modifier and Type Method and Description
KernelFunction<T> build()

Builds a new instance of KernelFunction<T>.

Builder<T> withDescription(String description)

Sets the description to use to build the function.

Builder<T> withFunctionName(String functionName)

Sets the function name to use to build the function.

Builder<T> withMethod(Method method)

Sets the method to use to build the function.

Builder<T> withParameters(List<InputVariable> parameters)

Sets the parameters to use to build the function.

Builder<T> withPluginName(String pluginName)

Sets the plugin name to use to build the function.

Builder<T> withReturnParameter(OutputVariable<?> returnParameter)

Sets the return parameter to use to build the function.

Builder<T> withTarget(Object target)

Sets the target to use to build the function.

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

Builder

public Builder()

Method Details

build

public KernelFunction build()

Builds a new instance of KernelFunction<T>.

Returns:

a new instance of KernelFunction<T>

withDescription

public KernelFunctionFromMethod.Builder withDescription(String description)

Sets the description to use to build the function.

Parameters:

description - the description to use

Returns:

this instance of the KernelFunctionFromMethod.Builder<T> class

withFunctionName

public KernelFunctionFromMethod.Builder 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.Builder<T> class

withMethod

public KernelFunctionFromMethod.Builder withMethod(Method method)

Sets the method to use to build the function.

Parameters:

method - the method to use

Returns:

this instance of the KernelFunctionFromMethod.Builder<T> class

withParameters

public KernelFunctionFromMethod.Builder withParameters(List parameters)

Sets the parameters to use to build the function.

Parameters:

parameters - the parameters to use

Returns:

this instance of the KernelFunctionFromMethod.Builder<T> class

withPluginName

public KernelFunctionFromMethod.Builder 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.Builder<T> class

withReturnParameter

public KernelFunctionFromMethod.Builder 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.Builder<T> class

withTarget

public KernelFunctionFromMethod.Builder withTarget(Object target)

Sets the target to use to build the function.

Parameters:

target - the target to use

Returns:

this instance of the KernelFunctionFromMethod.Builder<T> class

Applies to