All errors were API mismatches — handler code calling wrong method names, wrong argument types, or missing imports/derives. No logic changes. Build now passes with SQLX_OFFLINE=true. Key fixes: - embed_text -> embed_one, Vector -> Vec<f32> conversion - extract_token: extract auth header from HttpRequest first - AuthError variants aligned to actual enum definition - recursive async fns boxed (dfs_paths in inference + path_finder) - missing derives (Default, Serialize), imports (sqlx::Row, Timelike) - borrow-after-move: compute .len() before struct field move - streaming_body -> streaming with Result<Bytes> for SSE - CI: add SQLX_OFFLINE=true for offline builds without DB 25 files changed, 99 insertions(+), 81 deletions(-) Co-authored-by: rock <[email protected]>
This commit was merged in pull request #26.
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
//! confidence propagation through reasoning chains.
|
||||
|
||||
use std::collections::{HashMap, HashSet, VecDeque};
|
||||
use std::pin::Pin;
|
||||
use std::future::Future;
|
||||
use sqlx::PgPool;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use tracing::{debug, warn};
|
||||
@@ -293,18 +295,19 @@ impl InferenceEngine {
|
||||
}
|
||||
|
||||
/// DFS to find all paths
|
||||
async fn dfs_paths(
|
||||
&self,
|
||||
current: &str,
|
||||
target: &str,
|
||||
project_id: &str,
|
||||
fn dfs_paths<'a>(
|
||||
&'a self,
|
||||
current: &'a str,
|
||||
target: &'a str,
|
||||
project_id: &'a str,
|
||||
remaining_hops: usize,
|
||||
path: &mut Vec<String>,
|
||||
relations: &mut Vec<String>,
|
||||
confidences: &mut Vec<f32>,
|
||||
visited: &mut HashSet<String>,
|
||||
results: &mut Vec<ReasoningPath>,
|
||||
) -> Result<(), String> {
|
||||
path: &'a mut Vec<String>,
|
||||
relations: &'a mut Vec<String>,
|
||||
confidences: &'a mut Vec<f32>,
|
||||
visited: &'a mut HashSet<String>,
|
||||
results: &'a mut Vec<ReasoningPath>,
|
||||
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'a>> {
|
||||
Box::pin(async move {
|
||||
if remaining_hops == 0 {
|
||||
return Ok(());
|
||||
}
|
||||
@@ -350,6 +353,7 @@ impl InferenceEngine {
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}) // Box::pin
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user