Skip to main content

summarization_request

Function summarization_request 

Source
pub fn summarization_request(
    (system, prompt): (&str, String),
    spec: &ModelSpec,
    reasoning: Option<Reasoning>,
    max_output: Option<u64>,
) -> Result<CompletionRequest, UnsupportedOption>
Expand description

A one-off summary request to spec: system, then prompt as the user’s message, with the reasoning effort when the model takes it and no prompt-cache writes. Its output limit is max_output exactly when given, as a caller that fitted its own sets it, else the model’s output limit fitted by pi’s clamp to the room the input leaves (clamp_max_tokens).

§Errors

When spec does not take its default options.