about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorRen Kararou <[email protected]>2025-11-17 17:31:41 -0600
committerRen Kararou <[email protected]>2025-11-17 17:31:41 -0600
commit2bf0e883896cd1cc933736a0b6a76083c6774480 (patch)
treec70905eb3b5d35b01a45cd75ad7d23db10daa204 /src
parent8e5950ac17fd8717b71933e6740fda3f87e0cb82 (diff)
downloadviolet-2bf0e883896cd1cc933736a0b6a76083c6774480.tar.gz
violet-2bf0e883896cd1cc933736a0b6a76083c6774480.tar.bz2
violet-2bf0e883896cd1cc933736a0b6a76083c6774480.zip
add timeout config option
Diffstat (limited to 'src')
-rw-r--r--src/main.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 78bb61b..0605dd9 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -10,6 +10,7 @@ struct Config {
     base_url: String,
     key: String,
     model: String,
+    timeout: u64,
 }
 
 async fn get_horoscope(sign: &str) -> String {
@@ -26,7 +27,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
     let client = LlmClient::openai_with_config(
         &config.key,
         Some(&config.base_url),
-        Some(300),
+        Some(config.timeout),
         None,
     )?;
     eprintln!("Config Setup");