mirror of
https://github.com/perstarkse/minne.git
synced 2026-11-28 16:52:32 +01:00
feat: manual entity creation
chore: clippy
This commit is contained in:
1 parent
2964f1a5a5
commit
35ff4e1464
14 files changed
+653
-43
No files matched your search
@@ -305,9 +305,7 @@ async fn enrich_entities_from_graph(
|
||||
}
|
||||
|
||||
let existing_graph = entry.scores.graph.unwrap_or(f32::MIN);
|
||||
if graph_score > existing_graph {
|
||||
entry.scores.graph = Some(graph_score);
|
||||
} else if entry.scores.graph.is_none() {
|
||||
if graph_score > existing_graph || entry.scores.graph.is_none() {
|
||||
entry.scores.graph = Some(graph_score);
|
||||
}
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ impl Default for FusionWeights {
|
||||
}
|
||||
|
||||
pub fn clamp_unit(value: f32) -> f32 {
|
||||
value.max(0.0).min(1.0)
|
||||
value.clamp(0.0, 1.0)
|
||||
}
|
||||
|
||||
pub fn distance_to_similarity(distance: f32) -> f32 {
|
||||
|
||||
Reference in new issue
Block a user