Package org.machanism.machai.ai.tools
Annotation Type Param
Annotation to mark a method parameter marked as a
Tool or Prompt parameter within the AI provider framework.
Parameters annotated with @Param are recognized as structured arguments for tool functions or prompts,
providing metadata such as the parameter's name, description, and default value.
- name: Optional parameter name. If not specified,
NOT_DEFINEDis used as a placeholder. - description: Required description of the parameter's purpose and usage.
- defaultValue: Optional default value for the parameter. If not specified,
NOT_DEFINEDis used.
The annotation is retained at runtime and applicable to method parameters only.
The constant NULL can be used to indicate a null value for the parameter.
-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionDescription of the parameter's purpose and usage. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionOptional default value for the parameter.Optional parameter name. -
Field Summary
Fields
-
Field Details
-
NULL
Placeholder value indicating a null parameter value.- See Also:
-
NOT_DEFINED
Placeholder value indicating that the parameter name or default value is not defined.- See Also:
-
-
Element Details
-
name
String nameOptional parameter name. If not specified,NOT_DEFINEDis used.- Returns:
- the name of the parameter, or
NOT_DEFINEDif not set
- Default:
"___NOT_DEFINED___"
-
description
String descriptionDescription of the parameter's purpose and usage.- Returns:
- the parameter description
-
defaultValue
String defaultValueOptional default value for the parameter. If not specified,NOT_DEFINEDis used.- Returns:
- the default value of the parameter, or
NOT_DEFINEDif not set
- Default:
"___NOT_DEFINED___"
-