pub trait ProviderClient:
AsCompletion
+ AsTranscription
+ AsEmbeddings
+ AsImageGeneration
+ AsAudioGeneration
+ Debug {
// Required method
fn from_env() -> Self
where Self: Sized;
// Provided methods
fn boxed(self) -> Box<dyn ProviderClient>
where Self: Sized + 'static { ... }
fn from_env_boxed<'a>() -> Box<dyn ProviderClient + 'a>
where Self: Sized + 'a { ... }
}
Expand description
The base ProviderClient trait, facilitates conversion between client types and creating a client from the environment.
All conversion traits must be implemented, they are automatically implemented if the respective client trait is implemented.
Required Methods§
Provided Methods§
Sourcefn boxed(self) -> Box<dyn ProviderClient>where
Self: Sized + 'static,
fn boxed(self) -> Box<dyn ProviderClient>where
Self: Sized + 'static,
A helper method to box the client.
Sourcefn from_env_boxed<'a>() -> Box<dyn ProviderClient + 'a>where
Self: Sized + 'a,
fn from_env_boxed<'a>() -> Box<dyn ProviderClient + 'a>where
Self: Sized + 'a,
Create a boxed client from the process’s environment. Panics if an environment is improperly configured.