Expose REST embedder to the API

This commit is contained in:
Louis Dureuil 2024-03-25 10:05:38 +01:00
parent f87747f4d3
commit a1db342f01
No known key found for this signature in database
7 changed files with 357 additions and 32 deletions

View file

@ -194,7 +194,10 @@ impl Embedder {
pub fn distribution(&self) -> Option<DistributionShift> {
if self.options.model == "BAAI/bge-base-en-v1.5" {
Some(DistributionShift { current_mean: 0.85, current_sigma: 0.1 })
Some(DistributionShift {
current_mean: ordered_float::OrderedFloat(0.85),
current_sigma: ordered_float::OrderedFloat(0.1),
})
} else {
None
}