mirror of
https://gitea.ingwaz.work/Ingwaz/openbrain-mcp.git
synced 2026-06-15 22:07:08 +00:00
fix: add missing warn import, cast f64 similarity to f32
This commit is contained in:
@@ -17,7 +17,7 @@ use std::sync::Arc;
|
|||||||
use tokio::net::TcpListener;
|
use tokio::net::TcpListener;
|
||||||
use tower_http::cors::{Any, CorsLayer};
|
use tower_http::cors::{Any, CorsLayer};
|
||||||
use tower_http::trace::TraceLayer;
|
use tower_http::trace::TraceLayer;
|
||||||
use tracing::{error, info};
|
use tracing::{error, info, warn};
|
||||||
|
|
||||||
use crate::auth::auth_middleware;
|
use crate::auth::auth_middleware;
|
||||||
use crate::config::Config;
|
use crate::config::Config;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use tracing::{debug, error, info, warn};
|
use tracing::{debug, info, warn};
|
||||||
|
|
||||||
use crate::config::TruthConfig;
|
use crate::config::TruthConfig;
|
||||||
use crate::db::{Database, TruthScoreUpdate};
|
use crate::db::{Database, TruthScoreUpdate};
|
||||||
@@ -78,7 +78,7 @@ pub async fn run_scoring_cycle(
|
|||||||
let related: Vec<RelatedMemory> = related_rows
|
let related: Vec<RelatedMemory> = related_rows
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|row| RelatedMemory {
|
.map(|row| RelatedMemory {
|
||||||
similarity: row.similarity,
|
similarity: row.similarity as f32,
|
||||||
content: row.content,
|
content: row.content,
|
||||||
truth_value: row.truth_value,
|
truth_value: row.truth_value,
|
||||||
truth_confidence: row.truth_confidence,
|
truth_confidence: row.truth_confidence,
|
||||||
|
|||||||
Reference in New Issue
Block a user