Skip to content

Commit 0ab08c8

Browse files
author
Dongri Jin
authored
Merge pull request #23 from dongri/fix-api-base-naming
Rename env
2 parents 30c1772 + efd3672 commit 0ab08c8

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)