This commit is contained in:
Hitesh Joshi
2025-04-30 17:22:14 +05:30
parent 3f4b39db53
commit f722f83659

View File

@ -143,8 +143,7 @@ impl OpenAIClient {
async fn build_request(&self, method: Method, path: &str) -> reqwest::RequestBuilder {
let mut url = format!("{}/{}", self.api_endpoint, path);
if self.api_version.is_some() {
let api_version = self.api_version.as_ref().unwrap();
if let Some(api_version) = &self.api_key {
url = format!("{}?api-version={}", url, api_version);
}