Skip to content

Commit

Permalink
Merge pull request #147 from GustavoWidman/rustls-fix
Browse files Browse the repository at this point in the history
ensure rustls is used when feature is activated
  • Loading branch information
dongri authored Feb 2, 2025
2 parents 6b2a3fb + 731c64d commit b6a1d8f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/v1/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ impl OpenAIClient {
let url = format!("{}/{}", self.api_endpoint, path);
let client = Client::builder();

#[cfg(feature = "rustls")]
let client = client.use_rustls_tls();

let client = if let Some(timeout) = self.timeout {
client.timeout(std::time::Duration::from_secs(timeout))
} else {
Expand Down

0 comments on commit b6a1d8f

Please sign in to comment.