mlx_lm_utils/error.rs
1#[derive(Debug, thiserror::Error)]
2pub enum Error {
3 #[error(transparent)]
4 RenderTemplate(#[from] minijinja::Error),
5
6 /// continue_final_message is set but the final message does not appear in the chat after
7 /// applying the chat template! This can happen if the chat template deletes portions of
8 /// the final message. Please verify the chat template and final message in your chat to
9 /// ensure they are compatible.
10 #[error("continue_final_message is set but the final message does not appear in the chat after applying the chat template!")]
11 FinalMsgNotInChat,
12
13 #[error(transparent)]
14 Encode(#[from] tokenizers::tokenizer::Error),
15}