From 3c5e36355405900e6744baffd8a697df87354e1d Mon Sep 17 00:00:00 2001 From: Louis Dureuil Date: Tue, 17 Sep 2024 16:30:13 +0200 Subject: [PATCH] Remove default embedders --- milli/src/vector/mod.rs | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/milli/src/vector/mod.rs b/milli/src/vector/mod.rs index 04e646819..23417ced2 100644 --- a/milli/src/vector/mod.rs +++ b/milli/src/vector/mod.rs @@ -144,11 +144,6 @@ impl EmbeddingConfigs { self.0.get(name).cloned() } - /// Get the default embedder configuration, if any. - pub fn get_default(&self) -> Option<(Arc, Arc)> { - self.get(self.get_default_embedder_name()) - } - pub fn inner_as_ref(&self) -> &HashMap, Arc)> { &self.0 } @@ -156,24 +151,6 @@ impl EmbeddingConfigs { pub fn into_inner(self) -> HashMap, Arc)> { self.0 } - - /// Get the name of the default embedder configuration. - /// - /// The default embedder is determined as follows: - /// - /// - If there is only one embedder, it is always the default. - /// - If there are multiple embedders and one of them is called `default`, then that one is the default embedder. - /// - In all other cases, there is no default embedder. - pub fn get_default_embedder_name(&self) -> &str { - let mut it = self.0.keys(); - let first_name = it.next(); - let second_name = it.next(); - match (first_name, second_name) { - (None, _) => "default", - (Some(first), None) => first, - (Some(_), Some(_)) => "default", - } - } } impl IntoIterator for EmbeddingConfigs {