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:
@@ -185,9 +185,9 @@ impl CommunityDetector {
|
||||
|
||||
communities_vec.push(Community {
|
||||
id: comm_id,
|
||||
size: members.len(),
|
||||
entity_ids: members.into_iter().collect(),
|
||||
entity_names,
|
||||
size: members.len(),
|
||||
modularity_contribution: modularity_contrib,
|
||||
average_strength: strength,
|
||||
density,
|
||||
@@ -196,9 +196,9 @@ impl CommunityDetector {
|
||||
}
|
||||
|
||||
// 5. Calculate total modularity
|
||||
let total_modularity = communities_vec
|
||||
let total_modularity: f64 = communities_vec
|
||||
.iter()
|
||||
.map(|c| c.modularity_contribution)
|
||||
.map(|c| c.modularity_contribution as f64)
|
||||
.sum();
|
||||
|
||||
let average_community_size = if communities_vec.is_empty() {
|
||||
@@ -210,9 +210,9 @@ impl CommunityDetector {
|
||||
let result = CommunityDetectionResult {
|
||||
entity_count: entities.len(),
|
||||
edge_count: edges.len(),
|
||||
communities: communities_vec,
|
||||
community_count: communities_vec.len(),
|
||||
total_modularity: total_modularity.max(-1.0).min(1.0),
|
||||
communities: communities_vec,
|
||||
total_modularity: total_modularity.max(-1.0).min(1.0) as f32,
|
||||
average_community_size,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user