llama-cpp-bindings 0.10.0

llama.cpp bindings for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::error::sampler_apply_error::SamplerApplyError;
use crate::error::token_to_string_error::TokenToStringError;

#[derive(Debug, thiserror::Error, PartialEq, Eq)]
pub enum SampleError {
    #[error("not enough memory")]
    NotEnoughMemory,
    #[error("applying the sampler to the token data array failed: {0}")]
    SamplerApply(#[from] SamplerApplyError),
    #[error("token detokenization failed during classification: {0}")]
    Detokenize(#[from] TokenToStringError),
    #[error("the grammar sampler callback failed during sampling: {message}")]
    GrammarCallbackFailed { message: String },
    #[error("{message}")]
    Reported { message: String },
}