Skip to main content

classify

Function classify 

Source
pub async fn classify(
    backend: &mut CandleBackend,
    req: ClassifyRequest,
) -> Result<Vec<ClassifyResult>, InferenceError>
Expand description

Classify text against candidate labels.

Uses a prompt-based approach: asks the model to pick the best label, then parses the response. Falls back to first-token probability comparison when the response is ambiguous.