xberg-gliner 1.3.10

GLiNER inference used by xberg NER: span-mode ONNX runtime plus an optional Candle GLiNER2 backend.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use thiserror::Error;

/// Result type used by the `candle` module.
pub type Result<T> = std::result::Result<T, GlinerCandleError>;

/// Errors returned by Candle GLiNER2 inference, LoRA loading, and merge.
#[derive(Debug, Error)]
pub enum GlinerCandleError {
    /// Underlying Candle tensor/model error.
    #[error("candle error: {0}")]
    Candle(#[from] candle_core::Error),
    /// `xberg-gliner` prompt-encoding or decode error.
    #[error("gliner error: {0}")]
    Gliner(#[from] crate::GlinerError),
    /// Filesystem or config-parsing error during model/adapter loading.
    #[error("backend error: {0}")]
    Backend(String),
}