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