pub struct ShimClient { /* private fields */ }Implementations§
Source§impl ShimClient
impl ShimClient
pub fn new() -> Self
Sourcepub async fn warmup(&self, urls: &[&str])
pub async fn warmup(&self, urls: &[&str])
Pre-establish TCP+TLS connections to provider endpoints. Call this after creating the Router to warm the connection pool.
pub async fn send(&self, req: &ProviderRequest) -> Result<Response>
pub async fn completion( &self, provider: &dyn Provider, model: &str, request: &Value, ) -> Result<Value>
pub async fn stream( &self, provider: &dyn Provider, model: &str, request: &Value, ) -> Result<Pin<Box<dyn Stream<Item = Result<String>> + Send>>>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ShimClient
impl !UnwindSafe for ShimClient
impl Freeze for ShimClient
impl Send for ShimClient
impl Sync for ShimClient
impl Unpin for ShimClient
impl UnsafeUnpin for ShimClient
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