Skip to main content

llama_cpp_bindings/context/
load_session_error.rs

1use std::ffi::NulError;
2use std::path::PathBuf;
3
4#[derive(Debug, Eq, PartialEq, thiserror::Error)]
5pub enum LoadSessionError {
6    #[error("Failed to load session file")]
7    FailedToLoad,
8
9    #[error("null byte in string {0}")]
10    NullError(#[from] NulError),
11
12    #[error("failed to convert path {0} to str")]
13    PathToStrError(PathBuf),
14
15    #[error("max_length is not large enough to hold {n_out} (was {max_tokens})")]
16    InsufficientMaxLength { n_out: usize, max_tokens: usize },
17}