Skip to main content

classify_structured_output

Function classify_structured_output 

Source
pub fn classify_structured_output(body: Option<&str>) -> Option<FailureClass>
Expand description

Pure acceptance for the structured-output check (feedback 02 50-structured-output): the completion content must parse as a JSON object with sentinel exactly CF_HERMES_OK. None means the criterion holds; otherwise the closest existing taxonomy class is returned (InvalidJson for unparsable/wrong-value JSON, InvalidChatCompletionShape for a non-object, EmptyCompletion for empty content) - no new variant is introduced.