From 4ff626ab889e1ad6b186df2448b2d22eef7017d6 Mon Sep 17 00:00:00 2001 From: Jaakko Vanhala Date: Sat, 11 Apr 2026 17:37:16 +0300 Subject: [PATCH] broadcastit pois --- network-poc/native-node/src/main.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/network-poc/native-node/src/main.rs b/network-poc/native-node/src/main.rs index 5c70552..1f0236d 100644 --- a/network-poc/native-node/src/main.rs +++ b/network-poc/native-node/src/main.rs @@ -222,7 +222,7 @@ fn collect_system_info() -> serde_json::Value { } /// Koko auth-viesti hubille -fn build_auth_message(allocated_gb: u32) -> String { +fn build_auth_message(allocated_gb: u32, model_name: &str) -> String { let sys = collect_system_info(); let gpus = collect_all_gpus(); @@ -239,7 +239,7 @@ fn build_auth_message(allocated_gb: u32) -> String { "status": "agent_ready", "node_type": "native", "allocated_gb": allocated_gb, - "selected_task": "qwen2.5-coder:7b", + "selected_task": model_name, "system": sys, }); @@ -321,6 +321,9 @@ async fn main() { } }; + let active_model = llm.as_ref().map(|e| e.model_name()).unwrap_or_else(|| "unknown".to_string()); + tracing::info!("Käytettävä kielimalli konfiguroitu (selected_task): {}", active_model); + // Yhdistetään hubiin loop { match connect_async(&hub_url).await { @@ -328,7 +331,7 @@ async fn main() { tracing::info!("Yhdistetty hubiin!"); let (mut write, mut read) = ws_stream.split(); - let auth = build_auth_message(allocated_gb); + let auth = build_auth_message(allocated_gb, &active_model); if write.send(Message::Text(auth)).await.is_err() { tracing::error!("Auth-viestin lähetys epäonnistui"); continue;