log improvements and some code refactor (#379)

This commit is contained in:
Adil Hafeez 2025-01-31 10:37:53 -08:00 committed by GitHub
parent e79d16ec81
commit 39266b5084
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 160 additions and 134 deletions

View file

@ -2,7 +2,6 @@ use std::rc::Rc;
use crate::{configuration, llm_providers::LlmProviders};
use configuration::LlmProvider;
use log::debug;
use rand::{seq::IteratorRandom, thread_rng};
#[derive(Debug)]
@ -35,11 +34,9 @@ pub fn get_llm_provider(
}
if llm_providers.default().is_some() {
debug!("no llm provider found for hint, using default llm provider");
return llm_providers.default().unwrap();
}
debug!("no default llm found, using random llm provider");
let mut rng = thread_rng();
llm_providers
.iter()