Class PromptTemplate

java.lang.Object
com.codename1.ai.PromptTemplate

public final class PromptTemplate extends Object

Trivial {placeholder} substitution. Designed for the common "build a prompt from a handful of fields" pattern without pulling in a templating library. For anything more sophisticated (loops, conditionals) just compose strings directly.

String prompt = PromptTemplate.of(
    "You are an expert {role}. Reply in {style}."
).put("role", "tax accountant").put("style", "bullet points").build();