Skip to content

Commit efd3672

Browse files
author
Dongri Jin
committed
Rename env name
1 parent 30c1772 commit efd3672

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
@@ -35,8 +35,7 @@ pub struct Client {
3535

3636
impl Client {
3737
pub fn new(api_key: String) -> Self {
38-
let endpoint =
39-
std::env::var("OPENAI_API_ENDPOINT").unwrap_or_else(|_| API_URL_V1.to_owned());
38+
let endpoint = std::env::var("OPENAI_API_BASE").unwrap_or_else(|_| API_URL_V1.to_owned());
4039
Self::new_with_endpoint(endpoint, api_key)
4140
}
4241

0 commit comments

Comments
 (0)