mirror of
https://github.com/mii443/openai-api-rs.git
synced 2025-12-03 02:58:20 +00:00
Merge pull request #147 from GustavoWidman/rustls-fix
ensure rustls is used when feature is activated
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user