pub struct ModelHandoff { /* private fields */ }Implementations§
Source§impl ModelHandoff
impl ModelHandoff
pub fn new() -> Self
pub fn count_tokens(&self, text: &str) -> usize
pub fn count_message_tokens(&self, message: &Message) -> usize
pub fn count_total_tokens(&self, messages: &[Message]) -> usize
pub fn compact_messages( &self, messages: &[Message], target_tokens: usize, ) -> Vec<Message>
pub fn handoff_to_model( &self, _from_model: &str, to_model: &str, messages: &[Message], ) -> Result<Vec<Message>, LlmError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ModelHandoff
impl RefUnwindSafe for ModelHandoff
impl Send for ModelHandoff
impl Sync for ModelHandoff
impl Unpin for ModelHandoff
impl UnsafeUnpin for ModelHandoff
impl UnwindSafe for ModelHandoff
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