Package com.tnsai.annotations
Annotation Interface PromptTemplates
Specifies a prompt template file for custom state rendering.
The template file is loaded from the classpath and contains key-value pairs
where keys are referenced by State.template().
Template File Format
Standard Java properties format with ${value}, ${name},
and ${description} placeholders:
# prompts/life-cell.prompt.template
cell_state = Your cell is currently ${value}
neighbor_count = You have ${value} live neighbors around you
age = Your age is ${value}
Usage
@PromptTemplates("prompts/life-cell.prompt.template")
@RoleDeclaration(name = "LifeCell", goal = "Survive in the grid")
public class LifeCellRole extends Role {
@State(description = "Cell state", template = "cell_state")
private CellState state = CellState.DEAD;
@State(description = "Neighbors", template = "neighbor_count")
private int neighborCount = 0;
@State(description = "No template, uses default format")
private int generation = 0;
}
- Author:
- TnsAI Team
- See Also:
-
Required Element Summary
Required Elements
-
Element Details
-
value
String valueClasspath resource path to the prompt template file.Example:
"prompts/life-cell.prompt.template"- Returns:
- classpath resource path
-