mirror of
https://github.com/perstarkse/minne.git
synced 2026-11-13 11:03:29 +01: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:
1 parent
d90319f3b0
commit
920d7b5efb
17 files changed
+366
-304
No files matched your search
@@ -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