Skip to main content

is_empty_completion

Function is_empty_completion 

Source
pub fn is_empty_completion(response: &ChatResponse) -> bool
Expand description

true when a completion carries nothing the caller can deliver.

Blank means content.trim().is_empty() — every surface trims before rendering, so three spaces reach the reader as nothing at all — and no non-empty tool_calls. Some(vec![]) reads as none: providers disagree on which they send, and a model that calls a tool instead of speaking returns empty content by design, which must NOT count as empty.