fix(embedding): resolve large_enum_variant clippy error
This commit is contained in:
1 parent
1ed75ca156
commit
bd20482cea
1 file changed
+2
-2
@@ -193,14 +193,14 @@ fn fallback_embed(text: &str) -> Vec<f32> {
|
||||
}
|
||||
|
||||
enum EmbeddingModel {
|
||||
Candle(CandleEmbeddingModel),
|
||||
Candle(Box<CandleEmbeddingModel>),
|
||||
Fallback,
|
||||
}
|
||||
|
||||
impl EmbeddingModel {
|
||||
fn new() -> Self {
|
||||
match CandleEmbeddingModel::new() {
|
||||
Ok(model) => EmbeddingModel::Candle(model),
|
||||
Ok(model) => EmbeddingModel::Candle(Box::new(model)),
|
||||
Err(e) => {
|
||||
tracing::warn!(
|
||||
"Failed to initialize Candle BERT model ({e}); falling back to deterministic offline embeddings."
|
||||
|
||||
Reference in new issue
Block a user