Skip to main content

llama_runner/runner/
msg.rs

1use strum::{AsRefStr, Display};
2
3#[derive(Debug, Clone, Display, PartialEq, Eq, AsRefStr)]
4pub enum MessageRole {
5    #[strum(to_string = "assistant")]
6    Assistant,
7    #[strum(to_string = "user")]
8    User,
9    #[strum(to_string = "system")]
10    System,
11    #[strum(to_string = "{0}")]
12    Custom(&'static str),
13}
14
15#[derive(Debug, Clone)]
16pub enum ImageOrText<'a> {
17    Text(&'a str),
18    Image(&'a image::DynamicImage),
19}