Skip to main content

system_message

Function system_message 

Source
fn system_message(system: &str, cache: bool) -> Value
Expand description

Build the system message. With cache=true the content is an Anthropic-style block carrying cache_control: ephemeral so the (large, constant) system prompt can be cached across requests; with cache=false it’s a plain string, byte-identical to a no-caching request.