pub enum LLamaCppError {
BackendAlreadyInitialized,
ChatTemplateError(ChatTemplateError),
DecodeError(DecodeError),
EncodeError(EncodeError),
LlamaModelLoadError(LlamaModelLoadError),
LlamaContextLoadError(LlamaContextLoadError),
BatchAddError(BatchAddError),
EmbeddingError(EmbeddingsError),
}
Expand description
All errors that can occur in the llama-cpp crate.
Variants§
BackendAlreadyInitialized
The backend was already initialized. This can generally be ignored as initializing the backend is idempotent.
ChatTemplateError(ChatTemplateError)
There was an error while get the chat template from model.
DecodeError(DecodeError)
There was an error while decoding a batch.
EncodeError(EncodeError)
There was an error while encoding a batch.
LlamaModelLoadError(LlamaModelLoadError)
There was an error loading a model.
LlamaContextLoadError(LlamaContextLoadError)
There was an error creating a new model context.
BatchAddError(BatchAddError)
There was an error adding a token to a batch.
EmbeddingError(EmbeddingsError)
see EmbeddingsError
Trait Implementations§
Source§impl Debug for LLamaCppError
impl Debug for LLamaCppError
Source§impl Display for LLamaCppError
impl Display for LLamaCppError
Source§impl Error for LLamaCppError
impl Error for LLamaCppError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<BatchAddError> for LLamaCppError
impl From<BatchAddError> for LLamaCppError
Source§fn from(source: BatchAddError) -> Self
fn from(source: BatchAddError) -> Self
Converts to this type from the input type.
Source§impl From<ChatTemplateError> for LLamaCppError
impl From<ChatTemplateError> for LLamaCppError
Source§fn from(source: ChatTemplateError) -> Self
fn from(source: ChatTemplateError) -> Self
Converts to this type from the input type.
Source§impl From<DecodeError> for LLamaCppError
impl From<DecodeError> for LLamaCppError
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
Source§impl From<EmbeddingsError> for LLamaCppError
impl From<EmbeddingsError> for LLamaCppError
Source§fn from(source: EmbeddingsError) -> Self
fn from(source: EmbeddingsError) -> Self
Converts to this type from the input type.
Source§impl From<EncodeError> for LLamaCppError
impl From<EncodeError> for LLamaCppError
Source§fn from(source: EncodeError) -> Self
fn from(source: EncodeError) -> Self
Converts to this type from the input type.
Source§impl From<LlamaContextLoadError> for LLamaCppError
impl From<LlamaContextLoadError> for LLamaCppError
Source§fn from(source: LlamaContextLoadError) -> Self
fn from(source: LlamaContextLoadError) -> Self
Converts to this type from the input type.
Source§impl From<LlamaModelLoadError> for LLamaCppError
impl From<LlamaModelLoadError> for LLamaCppError
Source§fn from(source: LlamaModelLoadError) -> Self
fn from(source: LlamaModelLoadError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for LLamaCppError
impl PartialEq for LLamaCppError
impl Eq for LLamaCppError
impl StructuralPartialEq for LLamaCppError
Auto Trait Implementations§
impl Freeze for LLamaCppError
impl RefUnwindSafe for LLamaCppError
impl Send for LLamaCppError
impl Sync for LLamaCppError
impl Unpin for LLamaCppError
impl UnwindSafe for LLamaCppError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more