From 4ff02557837ef1e6a57ebb8306a9e81f24796c42 Mon Sep 17 00:00:00 2001 From: Louis Dureuil Date: Wed, 27 Mar 2024 11:51:14 +0100 Subject: [PATCH] remove unused function --- milli/src/vector/settings.rs | 52 ------------------------------------ 1 file changed, 52 deletions(-) diff --git a/milli/src/vector/settings.rs b/milli/src/vector/settings.rs index b13b84178..78f83cbea 100644 --- a/milli/src/vector/settings.rs +++ b/milli/src/vector/settings.rs @@ -237,58 +237,6 @@ impl std::fmt::Display for EmbedderSource { } } -impl EmbeddingSettings { - pub fn apply(&mut self, new: Self) { - let EmbeddingSettings { - source, - model, - revision, - api_key, - dimensions, - document_template, - url, - query, - input_field, - path_to_embeddings, - embedding_object, - input_type, - } = new; - let old_source = self.source; - self.source.apply(source); - // Reinitialize the whole setting object on a source change - if old_source != self.source { - *self = EmbeddingSettings { - source, - model, - revision, - api_key, - dimensions, - document_template, - url, - query, - input_field, - path_to_embeddings, - embedding_object, - input_type, - }; - return; - } - - self.model.apply(model); - self.revision.apply(revision); - self.api_key.apply(api_key); - self.dimensions.apply(dimensions); - self.document_template.apply(document_template); - - self.url.apply(url); - self.query.apply(query); - self.input_field.apply(input_field); - self.path_to_embeddings.apply(path_to_embeddings); - self.embedding_object.apply(embedding_object); - self.input_type.apply(input_type); - } -} - impl From for EmbeddingSettings { fn from(value: EmbeddingConfig) -> Self { let EmbeddingConfig { embedder_options, prompt } = value;