| 1 | use serde::{Deserialize, Serialize}; |
| 2 | |
| 3 | /// Chat model status, mirrored to the frontend via the |
| 4 | /// `chat_status_changed` event and the `chat_get_status` command. |
| 5 | #[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] |
| 6 | #[serde(rename_all = "snake_case")] |
| 7 | pub enum ChatStatus { |
| 8 | /// No model is loaded. |
| 9 | Unloaded, |
| 10 | /// Model is currently being downloaded / loaded into memory. |
| 11 | Loading, |
| 12 | /// Model is loaded and ready to chat. |
| 13 | Ready, |
| 14 | /// Model is actively generating a response. |
| 15 | Generating, |
| 16 | /// Model failed to load. |
| 17 | Error, |
| 18 | } |