Reindex embedders

This commit is contained in:
Louis Dureuil 2024-09-02 12:58:09 +02:00
parent 03fda78901
commit 21296190a3
No known key found for this signature in database
2 changed files with 37 additions and 1 deletions

View file

@ -305,6 +305,16 @@ impl Embedder {
Embedder::Rest(embedder) => embedder.distribution(),
}
}
pub fn uses_document_template(&self) -> bool {
match self {
Embedder::HuggingFace(_)
| Embedder::OpenAi(_)
| Embedder::Ollama(_)
| Embedder::Rest(_) => true,
Embedder::UserProvided(_) => false,
}
}
}
/// Describes the mean and sigma of distribution of embedding similarity in the embedding space.