diff --git a/src/v1/api.rs b/src/v1/api.rs index 5d35707..811f0c8 100644 --- a/src/v1/api.rs +++ b/src/v1/api.rs @@ -35,8 +35,7 @@ pub struct Client { impl Client { pub fn new(api_key: String) -> Self { - let endpoint = - std::env::var("OPENAI_API_ENDPOINT").unwrap_or_else(|_| API_URL_V1.to_owned()); + let endpoint = std::env::var("OPENAI_API_BASE").unwrap_or_else(|_| API_URL_V1.to_owned()); Self::new_with_endpoint(endpoint, api_key) }