Skip to main content

summarize_structured

Function summarize_structured 

Source
pub async fn summarize_structured(
    deps: &SummarizationDeps,
    messages: &[Message],
    guidelines: &str,
) -> Result<AnchoredSummary, LlmError>
Expand description

Attempt structured summarization via chat_typed_erased::<AnchoredSummary>().

Returns Ok(AnchoredSummary) on success, Err when mandatory fields are missing or the LLM fails. The caller is responsible for falling back to prose on Err.

ยงErrors

Returns zeph_llm::LlmError when the LLM call fails, times out, or the returned summary is incomplete.