Package org.machanism.machai.ai.tools
Annotation Type Prompt
Annotation to mark a method as a prompt within the AI provider framework.
Methods annotated with @Prompt are recognized as prompt definitions, typically used for
dynamic invocation, prompt cataloging, or role-based message handling. The annotation provides metadata
such as the prompt's name, description, and associated role.
- name: Optional prompt name. If not specified,
NOT_DEFINEDis used as a placeholder. - description: Required description of the prompt's purpose and content.
- role: The participant role associated with the prompt (default:
Role.ASSISTANT).
The annotation is retained at runtime and applicable to methods only.
-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionDescription of the prompt's purpose and content. -
Optional Element Summary
Optional Elements -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringPlaceholder value indicating that the prompt name is not defined.
-
Field Details
-
NOT_DEFINED
Placeholder value indicating that the prompt name is not defined.- See Also:
-
-
Element Details
-
name
String nameOptional prompt name. If not specified,NOT_DEFINEDis used.- Returns:
- the name of the prompt, or
NOT_DEFINEDif not set
- Default:
"___NOT_DEFINED___"
-
description
String descriptionDescription of the prompt's purpose and content.- Returns:
- the prompt description
-
role
Role roleThe participant role associated with the prompt. Defaults toRole.ASSISTANT.- Returns:
- the role for the prompt
- Default:
ASSISTANT
-