pub enum ProviderClient {
CodineerApi(CodineerApiClient),
Xai(OpenAiCompatClient),
OpenAi(OpenAiCompatClient),
}Variants§
Implementations§
Source§impl ProviderClient
impl ProviderClient
pub fn from_model(model: &str) -> Result<Self, ApiError>
pub fn from_model_with_default_auth( model: &str, default_auth: Option<AuthSource>, ) -> Result<Self, ApiError>
pub const fn provider_kind(&self) -> ProviderKind
pub async fn send_message( &self, request: &MessageRequest, ) -> Result<MessageResponse, ApiError>
pub async fn stream_message( &self, request: &MessageRequest, ) -> Result<MessageStream, ApiError>
Trait Implementations§
Source§impl Clone for ProviderClient
impl Clone for ProviderClient
Source§fn clone(&self) -> ProviderClient
fn clone(&self) -> ProviderClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ProviderClient
impl !RefUnwindSafe for ProviderClient
impl Send for ProviderClient
impl Sync for ProviderClient
impl Unpin for ProviderClient
impl UnsafeUnpin for ProviderClient
impl !UnwindSafe for ProviderClient
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