pub struct ProviderHandle { /* private fields */ }Expand description
Owning handle to provider components. This is an executable transport handle supplied by the host, not a persistence format.
Implementations§
Source§impl ProviderHandle
impl ProviderHandle
pub fn new(components: ProviderComponents) -> Self
pub fn components(&self) -> &ProviderComponents
pub fn components_mut(&mut self) -> &mut ProviderComponents
pub fn kind(&self) -> &'static str
pub fn supported_variants(&self, model: &str) -> &'static [&'static str]
pub fn validate_variant(&self, model: &str, variant: &str) -> Result<(), String>
pub fn input_usage_excludes_cached_tokens(&self) -> bool
pub fn options(&self) -> ProviderOptions
pub fn set_options(&mut self, options: ProviderOptions)
pub fn requires_streaming(&self) -> bool
pub async fn complete( &mut self, request: LlmRequest, ) -> Result<LlmResponse, LlmTransportError>
pub fn to_spec(&self) -> ProviderSpec
Trait Implementations§
Source§impl Clone for ProviderHandle
impl Clone for ProviderHandle
Source§impl Debug for ProviderHandle
impl Debug for ProviderHandle
Source§impl Default for ProviderHandle
impl Default for ProviderHandle
impl Eq for ProviderHandle
Source§impl PartialEq for ProviderHandle
impl PartialEq for ProviderHandle
Auto Trait Implementations§
impl !RefUnwindSafe for ProviderHandle
impl !UnwindSafe for ProviderHandle
impl Freeze for ProviderHandle
impl Send for ProviderHandle
impl Sync for ProviderHandle
impl Unpin for ProviderHandle
impl UnsafeUnpin for ProviderHandle
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