Skip to main content

prepare_content

Function prepare_content 

Source
pub fn prepare_content(bytes: &[u8], max_bytes: usize) -> String
Expand description

Lossy-UTF8 a captured body and truncate it to max_bytes on a char boundary (with a marker), so a large prompt/response can’t bloat the emitted span. Used at the content-capture wiring site.