mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2025-12-12 06:20:09 +01:00
chore: default locale & request timeout
This commit is contained in:
parent
a44e8b0fbe
commit
d1b42d1c59
2 changed files with 2 additions and 1 deletions
|
|
@ -40,7 +40,7 @@ i18n!("i18n", fallback = "en", minify_key = true);
|
||||||
fn main() {
|
fn main() {
|
||||||
colored::control::set_override(true);
|
colored::control::set_override(true);
|
||||||
// let locale = std::env::var("LANG").unwrap_or("en_US".to_string());
|
// 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]);
|
rust_i18n::set_locale(&locale[0..2]);
|
||||||
|
|
||||||
#[cfg(feature = "request-ai")]
|
#[cfg(feature = "request-ai")]
|
||||||
|
|
|
||||||
|
|
@ -99,6 +99,7 @@ You run the command `{last_command}` and get the following error message: `{erro
|
||||||
.header("Authorization", format!("Bearer {}", api_key))
|
.header("Authorization", format!("Bearer {}", api_key))
|
||||||
.header("Content-Type", "application/json")
|
.header("Content-Type", "application/json")
|
||||||
.json(&messages)
|
.json(&messages)
|
||||||
|
.timeout(std::time::Duration::from_secs(10))
|
||||||
.send();
|
.send();
|
||||||
|
|
||||||
let res = match res {
|
let res = match res {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue