OneParameterFunction

public final class OneParameterFunction<T extends Object> extends FunctionDeclaration


A declared one param function, including implementation, that a model can be given access to in order to gain info or complete tasks.

See also
defineFunction

for how to create an instance of this class.

Summary

Public methods

@NonNull JSONObject

Run the attached function with the provided arguments.

@NonNull List<@NonNull Schema<@NonNull T>>

The parameters of the attached function as a list of Schema.

Public fields

function

public final @NonNull SuspendFunction1<@NonNull T, @NonNull JSONObjectfunction

param

public final @NonNull Schema<@NonNull T> param

Public methods

execute

public @NonNull JSONObject execute(@NonNull FunctionCallPart part)

Run the attached function with the provided arguments.

getParameters

public @NonNull List<@NonNull Schema<@NonNull T>> getParameters()

The parameters of the attached function as a list of Schema.