Skip to main content

serialize_block

Function serialize_block 

Source
pub fn serialize_block(messages: &[&ChatMessage], max_chars: usize) -> String
Expand description

Serialise a block of messages into a compact human-readable transcript.

Each message is rendered as [role] content with individual fields truncated. The entire output is then truncated to max_chars.