pub trait CreateModel {
    // Required method
    fn start<'async_trait>(
    ) -> Pin<Box<dyn Future<Output = Self> + Send + 'async_trait>>
       where Self: 'async_trait;

    // Provided method
    fn requires_download() -> bool { ... }
}
Expand description

A model that can be created asynchronously.

§Example

use rbert::*;
use kalosm_language_model::CreateModel;

#[tokio::main]
async fn main() {
    let mut bert = Bert::start().await;
}

Required Methods§

source

fn start<'async_trait>( ) -> Pin<Box<dyn Future<Output = Self> + Send + 'async_trait>>
where Self: 'async_trait,

Start the model.

Provided Methods§

source

fn requires_download() -> bool

Check if the model will need to be downloaded before use (default: false)

Object Safety§

This trait is not object safe.

Implementors§