broadcastit pois
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user