load static method
Loads and renders the prompt named name (e.g. kb_analysis.xml).
variables are substituted for ${key} placeholders. Missing variables
are replaced with an empty string.
Implementation
static Future<String> load(String name, Map<String, String> variables) async {
final cached = _cache[name];
if (cached != null) {
return _render(cached, variables);
}
final raw = await (_loader ?? _defaultLoader)(name);
_cache[name] = raw;
return _render(raw, variables);
}