use deepseek_recipe_core::conversation::Conversation;
use deepseek_recipe_core::multimodal::ImageSource;
pub use tokenizer::TokenizerEncoder;
pub use v4::{dsv4, dsv41};
pub mod v4;
mod tokenizer;
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct RenderedPrompt {
pub prompt: String,
pub image_sources: Vec<ImageSource>,
}
#[derive(Debug, thiserror::Error)]
pub enum EncodingError {
#[error("failed to encode conversation: {0}")]
Encode(String),
#[error("no tokenizer is attached to the encoding")]
MissingTokenizer,
}
pub trait PromptEncoding {
fn encode(&self, conversation: &Conversation) -> Result<Vec<u32>, EncodingError>;
fn render_conversation(&self, conversation: &Conversation) -> RenderedPrompt;
}