Trait ai2::models::LanguageModel

source ·
pub trait LanguageModel {
    // Required methods
    fn name(&self) -> String;
    fn count_tokens(&self, content: &str) -> Result<usize>;
    fn truncate(
        &self,
        content: &str,
        length: usize,
        direction: TruncationDirection
    ) -> Result<String>;
    fn capacity(&self) -> Result<usize>;
}

Required Methods§

source

fn name(&self) -> String

source

fn count_tokens(&self, content: &str) -> Result<usize>

source

fn truncate( &self, content: &str, length: usize, direction: TruncationDirection ) -> Result<String>

source

fn capacity(&self) -> Result<usize>

Implementors§