diff --git a/src/main.rs b/src/main.rs index d86c549..88a2acd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -40,7 +40,7 @@ i18n!("i18n", fallback = "en", minify_key = true); fn main() { colored::control::set_override(true); // let locale = std::env::var("LANG").unwrap_or("en_US".to_string()); - let locale = get_locale().unwrap_or("en_US".to_string()); + let locale = get_locale().unwrap_or("en-US".to_string()); rust_i18n::set_locale(&locale[0..2]); #[cfg(feature = "request-ai")] diff --git a/src/requests.rs b/src/requests.rs index 83caaf1..48e6c2e 100644 --- a/src/requests.rs +++ b/src/requests.rs @@ -99,6 +99,7 @@ You run the command `{last_command}` and get the following error message: `{erro .header("Authorization", format!("Bearer {}", api_key)) .header("Content-Type", "application/json") .json(&messages) + .timeout(std::time::Duration::from_secs(10)) .send(); let res = match res {