Skip to content

Commit f722f83

Browse files
committed
knit
1 parent 3f4b39d commit f722f83

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/v1/api.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,7 @@ impl OpenAIClient {
143143
async fn build_request(&self, method: Method, path: &str) -> reqwest::RequestBuilder {
144144
let mut url = format!("{}/{}", self.api_endpoint, path);
145145

146-
if self.api_version.is_some() {
147-
let api_version = self.api_version.as_ref().unwrap();
146+
if let Some(api_version) = &self.api_key {
148147
url = format!("{}?api-version={}", url, api_version);
149148
}
150149

0 commit comments

Comments
 (0)