llama_cpp_bindings/error/
logits_error.rs1#[derive(Debug, Eq, PartialEq, thiserror::Error)]
3pub enum LogitsError {
4 #[error("logits data pointer is null")]
6 NullLogits,
7 #[error("logit for token index {0} is not initialized")]
9 TokenNotInitialized(i32),
10 #[error("token index {token_index} exceeds context size {context_size}")]
12 TokenIndexExceedsContext {
13 token_index: u32,
15 context_size: u32,
17 },
18 #[error("n_vocab does not fit into usize: {0}")]
20 VocabSizeOverflow(#[source] std::num::TryFromIntError),
21 #[error("token_index does not fit into u32: {0}")]
23 TokenIndexOverflow(#[source] std::num::TryFromIntError),
24}