Skip to main content

value_has_cache_control

Function value_has_cache_control 

Source
pub fn value_has_cache_control(v: &Value) -> bool
Expand description

true if a system value (string or array of blocks) carries any cache_control breakpoint. Then it anchors the client’s prompt cache and the whole field must be left verbatim. A plain string system prompt never carries one (Anthropic places cache_control on blocks), so it is safe.