Skip to main content

compose_fragments

Function compose_fragments 

Source
pub fn compose_fragments(
    fragments: &[Box<dyn PromptFragment>],
    ctx: &FragmentContext<'_>,
) -> String
Expand description

Sort fragments by priority (ascending) and concatenate with double newlines.

Fragments that return None from render() are skipped. Empty result returns an empty string.