use async_trait::async_trait;
use lc_schema::{AudioContent, ImageContent};
use super::BaseChatModel;
#[derive(Debug, thiserror::Error)]
#[non_exhaustive]
pub enum MultimodalError {
#[error("Unsupported multimodal operation: {0}")]
Unsupported(String),
#[error("HTTP error: {0}")]
HttpError(String),
#[error("API error: {0}")]
ApiError(String),
#[error("Parse error: {0}")]
ParseError(String),
}
#[async_trait]
pub trait MultimodalModel: BaseChatModel + Send + Sync {
async fn transcribe(&self, _audio: AudioContent) -> Result<String, MultimodalError> {
Err(MultimodalError::Unsupported("transcribe".to_string()))
}
async fn generate_speech(&self, _text: &str) -> Result<Vec<u8>, MultimodalError> {
Err(MultimodalError::Unsupported("generate_speech".to_string()))
}
async fn generate_image(&self, _prompt: &str) -> Result<ImageContent, MultimodalError> {
Err(MultimodalError::Unsupported("generate_image".to_string()))
}
}