When using this crate, I wanted to specify a openai_api_base and I add to do
let mut openai_config = OpenAIConfig::default();
openai_config = openai_config.with_api_base(std::env::var("OPENAI_API_BASE").expect("OPENAI_API_BASE not set"));
Could be interesting to be able to read api_base from env variable in the constructor (same as openai_api_key).
I have the code ready for a pull request.