batch_mode_batch_scribe/
errors.rs

1// ---------------- [ File: batch-mode-batch-scribe/src/errors.rs ]
2crate::ix!();
3
4error_tree!{
5    pub enum BatchInputCreationError {
6        IOError(std::io::Error),
7        SerdeJsonError(serde_json::Error),
8    }
9
10    pub enum ParseTokenDescriptionLineError {
11        MissingToken,
12        MissingDescription,
13    }
14
15    pub enum TokenizerError {
16        TokenizerError(String),
17    }
18
19    pub enum LanguageModelBatchCreationError {
20        #[display("attempting to construct a trivially small batch of size {len}. are you sure you want to do this?")]
21        TrivialBatchSizeBlocked {
22            len: usize,
23        },
24        OpenAIError(OpenAIError),
25        IOError(std::io::Error),
26        TokenizerError(TokenizerError),
27        ParseTokenDescriptionLineError(ParseTokenDescriptionLineError),
28        SerdeJsonError(serde_json::Error),
29    }
30}