pub enum TokenCounting {
None,
Local,
Endpoint,
}Expand description
How a model can count the tokens a request costs, when it can.
LanguageModel::token_counting reports which kind of counting a model
offers: Local counts in-process against a published vocabulary and is
cheap enough to run on every assembly; Endpoint counts exactly over a
network call and is worth its round trip only near a threshold.
Variants§
None
No counting: the caller falls back to its estimate.
Local
In-process counting against an embedded vocabulary.
Endpoint
Counting through a provider endpoint.
Trait Implementations§
Source§impl Clone for TokenCounting
impl Clone for TokenCounting
impl Copy for TokenCounting
Source§impl Debug for TokenCounting
impl Debug for TokenCounting
Source§impl Default for TokenCounting
impl Default for TokenCounting
impl Eq for TokenCounting
Source§impl PartialEq for TokenCounting
impl PartialEq for TokenCounting
impl StructuralPartialEq for TokenCounting
Auto Trait Implementations§
impl Forget for TokenCounting
impl Freeze for TokenCounting
impl RefUnwindSafe for TokenCounting
impl Send for TokenCounting
impl Sync for TokenCounting
impl Unpin for TokenCounting
impl UnsafeUnpin for TokenCounting
impl UnwindSafe for TokenCounting
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