diff options
Diffstat (limited to 'src/openrouter/mod.rs')
| -rw-r--r-- | src/openrouter/mod.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/openrouter/mod.rs b/src/openrouter/mod.rs index 1d3b443..1b2caf4 100644 --- a/src/openrouter/mod.rs +++ b/src/openrouter/mod.rs | |||
| @@ -1,3 +1,5 @@ | |||
| 1 | use std::time::Duration; | ||
| 2 | |||
| 1 | use tracing::info; | 3 | use tracing::info; |
| 2 | 4 | ||
| 3 | use reqwest::Client; | 5 | use reqwest::Client; |
| @@ -49,7 +51,11 @@ impl OpenRouterClient { | |||
| 49 | api_key, | 51 | api_key, |
| 50 | model, | 52 | model, |
| 51 | api_url, | 53 | api_url, |
| 52 | client: Client::new(), | 54 | client: Client::builder() |
| 55 | .connect_timeout(Duration::from_secs(10)) | ||
| 56 | .timeout(Duration::from_secs(60)) | ||
| 57 | .build() | ||
| 58 | .unwrap_or_default(), | ||
| 53 | } | 59 | } |
| 54 | } | 60 | } |
| 55 | 61 | ||
