ai.internal.make_role
Construct a typed role marker for structural prompt assembly. The `${role(...)}` desugar in an LLM prompt body lowers to this call.
Reference version
Signature
function ai.internal.make_role(
name: string,
metadata: map<string, baml.json.json> = …
) -> ai.Role throws never
Construct a typed role marker for structural prompt assembly.
The ${role(...)} desugar in an LLM prompt body lowers to this call.
metadata carries per-message provider directives, which reach the provider
client as ai.PromptMessage.metadata.
Source:<builtin>/ai/ns_internal/prompt.bamlbytes 2578–2744