pub struct TiktokenEstimator { /* private fields */ }Implementations§
Source§impl TiktokenEstimator
impl TiktokenEstimator
pub fn o200k_base() -> Result<Self, TokenFoldError>
pub fn cl100k_base() -> Result<Self, TokenFoldError>
Trait Implementations§
Source§impl TokenEstimator for TiktokenEstimator
Available on crate feature tiktoken only.
impl TokenEstimator for TiktokenEstimator
Available on crate feature
tiktoken only.Source§fn info(&self) -> EstimatorInfo
fn info(&self) -> EstimatorInfo
Estimator provenance for
CompressionReport.estimator.fn count_bytes(&self, bytes: &[u8]) -> usize
Auto Trait Implementations§
impl Freeze for TiktokenEstimator
impl RefUnwindSafe for TiktokenEstimator
impl Send for TiktokenEstimator
impl Sync for TiktokenEstimator
impl Unpin for TiktokenEstimator
impl UnsafeUnpin for TiktokenEstimator
impl UnwindSafe for TiktokenEstimator
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