Package de.espirit.firstspirit.ai.dto
Interface Function.Builder
- Enclosing interface:
- Function
public static interface Function.Builder
Builder for a function definition.
- Since:
- 5.2.250908
-
Method Summary
Modifier and TypeMethodDescription@NotNull Function.Builder
addParameter
(@NotNull FunctionParameter parameter) Adds a new parameter to the function definition.@NotNull Function
create()
Creates a new function definition.@NotNull Function.Builder
description
(@Nullable String description) Configures description of what the function does, used by the model to choose when and how to call the function.@NotNull Function.Builder
Configures the name of the function.
-
Method Details
-
name
Configures the name of the function.- Parameters:
name
- The function name.- Returns:
- This builder instance.
- Since:
- 5.2.250908
-
description
@Contract("_ -> this") @NotNull @NotNull Function.Builder description(@Nullable @Nullable String description) Configures description of what the function does, used by the model to choose when and how to call the function.- Parameters:
description
- The function description.- Returns:
- This builder instance.
- Since:
- 5.2.250908
-
addParameter
@Contract("_ -> this") @NotNull @NotNull Function.Builder addParameter(@NotNull @NotNull FunctionParameter parameter) Adds a new parameter to the function definition.- Parameters:
parameter
- The function parameter to be added.- Returns:
- This builder instance.
- Since:
- 5.2.250908
-
create
Creates a new function definition.- Returns:
- The new function instance.
- Since:
- 5.2.250908
-