Rename env name

This commit is contained in:
Dongri Jin
2023-08-04 06:47:06 +09:00
parent 30c17729ee
commit efd367289f

View File

@ -35,8 +35,7 @@ pub struct Client {
impl Client { impl Client {
pub fn new(api_key: String) -> Self { pub fn new(api_key: String) -> Self {
let endpoint = let endpoint = std::env::var("OPENAI_API_BASE").unwrap_or_else(|_| API_URL_V1.to_owned());
std::env::var("OPENAI_API_ENDPOINT").unwrap_or_else(|_| API_URL_V1.to_owned());
Self::new_with_endpoint(endpoint, api_key) Self::new_with_endpoint(endpoint, api_key)
} }