ai.internal.assemble_llm_prompt

Assemble a compiler-generated LLM prompt while preserving the legacy default for wholly role-less prompts and implicit leading content before a later explicit role. Standalone `ai.prompt` remains role-less when its author does not opt into roles; this compatibility rule applies only to declarative `prompt:` bodies.

Reference version

Signature

function ai.internal.assemble_llm_prompt(parts: string[], values: unknown[]) -> ai.Prompt

Assemble a compiler-generated LLM prompt while preserving the legacy default for wholly role-less prompts and implicit leading content before a later explicit role. Standalone ai.prompt remains role-less when its author does not opt into roles; this compatibility rule applies only to declarative prompt: bodies.

Source:<builtin>/ai/ns_internal/helpers.bamlbytes 28324260