use crate::{ModelConfig, TrainingStats, Triple, Vector};
use anyhow::Result;
pub struct BaseEmbeddingModel {
config: ModelConfig,
dimension: usize,
}
impl BaseEmbeddingModel {
pub fn new(config: ModelConfig) -> Result<Self> {
Ok(Self {
dimension: config.dimensions,
config,
})
}
pub async fn embed(&self, triples: &[Triple]) -> Result<Vec<Vector>> {
let embeddings = triples
.iter()
.map(|_| Vector::new(vec![0.0; self.dimension]))
.collect();
Ok(embeddings)
}
pub async fn train(&mut self, _triples: &[Triple]) -> Result<TrainingStats> {
Ok(TrainingStats::default())
}
}