pub struct Client { /* private fields */ }
Expand description
OpenAI API client
Implementations§
Source§impl Client
impl Client
Sourcepub fn from_env_file(env: impl AsRef<str>) -> Result<Self>
pub fn from_env_file(env: impl AsRef<str>) -> Result<Self>
create client from customized env file, convenient for development, use dotenv
crate
Sourcepub fn from_default_env() -> Result<Self>
pub fn from_default_env() -> Result<Self>
create client from default env file: .env
, convenient for development, use dotenv
crate
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
create a client builder
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl !Send for Client
impl !Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more