mirror of
https://github.com/perstarkse/minne.git
synced 2026-05-30 03:10:45 +02:00
chore: centralize embedding errors, retrieval strategy, and test DB helpers.
Replace anyhow in embedding production code with EmbeddingError, move RetrievalStrategy into common config, and deduplicate Surreal test setup via common::test_utils.
This commit is contained in:
@@ -158,10 +158,7 @@ async fn create_single_entity(
|
||||
);
|
||||
|
||||
let embedding = if let Some(provider) = embedding_provider {
|
||||
provider
|
||||
.embed(&embedding_input)
|
||||
.await
|
||||
.map_err(|e| AppError::InternalError(format!("FastEmbed embedding for entity failed: {e}")))?
|
||||
provider.embed(&embedding_input).await?
|
||||
} else {
|
||||
generate_embedding(openai_client, &embedding_input, db_client).await?
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user