Skip to main content

summarize

Function summarize 

Source
pub async fn summarize(
    stream_fn: &StreamFn,
    opts: &LlmOpts,
    conversation: &[AgentMessage],
    instructions: Option<&str>,
) -> Result<Summary, String>
Expand description

Summarize conversation with the configured LLM, optionally focused by instructions (the /compact <prompt> argument). Drives the same StreamFn the agent uses, collecting the streamed text. Returns an error string on a stream error, or when the summarizer produces no text.