Trait MultimodalPromptPrefixer

Source
pub trait MultimodalPromptPrefixer: Send + Sync {
    // Provided methods
    fn prefix_image(&self, _image_indices: Vec<usize>, prompt: &str) -> String { ... }
    fn prefix_audio(&self, _audio_indexes: Vec<usize>, prompt: &str) -> String { ... }
}
Expand description

Prepend a vision tag appropriate for the model to the prompt. Image indexing is assumed that start at 0.

Provided Methods§

Source

fn prefix_image(&self, _image_indices: Vec<usize>, prompt: &str) -> String

Prefix for inclusion in messages (may do nothing if the chat template handles it).

Source

fn prefix_audio(&self, _audio_indexes: Vec<usize>, prompt: &str) -> String

Prefix for inclusion in messages (may do nothing if the chat template handles it).

Implementors§