We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3f4b39d commit f722f83Copy full SHA for f722f83
src/v1/api.rs
@@ -143,8 +143,7 @@ impl OpenAIClient {
143
async fn build_request(&self, method: Method, path: &str) -> reqwest::RequestBuilder {
144
let mut url = format!("{}/{}", self.api_endpoint, path);
145
146
- if self.api_version.is_some() {
147
- let api_version = self.api_version.as_ref().unwrap();
+ if let Some(api_version) = &self.api_key {
148
url = format!("{}?api-version={}", url, api_version);
149
}
150
0 commit comments