Package de.espirit.firstspirit.ai.dto
Interface FunctionParameter.Builder
- Enclosing interface:
- FunctionParameter
public static interface FunctionParameter.Builder
Builder for a function parameter definition.
- Since:
- 5.2.250908
-
Method Summary
Modifier and TypeMethodDescription@NotNull FunctionParameter
create()
Creates a new parameter definition.@NotNull FunctionParameter.Builder
description
(@NotNull String description) Configures a description of the parameter, used by the model to choose how to call the function.@NotNull FunctionParameter.Builder
Configures the name of the function parameter.@NotNull FunctionParameter.Builder
required
(boolean required) Configures whether the parameter is required or optional.@NotNull FunctionParameter.Builder
Configures the type of the value.
-
Method Details
-
name
@Contract("_ -> this") @NotNull @NotNull FunctionParameter.Builder name(@NotNull @NotNull String name) Configures the name of the function parameter.- Parameters:
name
- The function parameter name.- Returns:
- This builder instance.
- Since:
- 5.2.250908
-
type
@Contract("_ -> this") @NotNull @NotNull FunctionParameter.Builder type(@NotNull @NotNull String type) Configures the type of the value.- Parameters:
type
- The value type.- Returns:
- This builder instance.
- Since:
- 5.2.250908
-
description
@Contract("_ -> this") @NotNull @NotNull FunctionParameter.Builder description(@NotNull @NotNull String description) Configures a description of the parameter, used by the model to choose how to call the function.- Parameters:
description
- The parameter description.- Returns:
- This builder instance.
- Since:
- 5.2.250908
-
required
Configures whether the parameter is required or optional.NOTE: Usually the configured AI operate internally in a "strict mode" when using function calls, which ensures function calls reliably adhere to the function schema instead of being best-effort. However, there may be certain restrictions for that, like parameters being declared as required. The configured AI may switch to a non-strict mode, if optional parameters are being used.
- Parameters:
required
-true
if required (default),false
if optional.- Returns:
- This builder instance.
- Since:
- 5.2.250908
-
create
Creates a new parameter definition.- Returns:
- The parameter definition.
- Since:
- 5.2.250908
-