Skip to main content

StoryProvider

Trait StoryProvider 

Source
pub trait StoryProvider: Send + Sync {
    // Required methods
    fn generate_story<'life0, 'life1, 'async_trait>(
        &'life0 self,
        prompt: &'life1 str,
        max_tokens: u32,
    ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn is_available(&self) -> bool;
    fn provider_name(&self) -> &str;
    fn model_name(&self) -> &str;
}

Required Methods§

Source

fn generate_story<'life0, 'life1, 'async_trait>( &'life0 self, prompt: &'life1 str, max_tokens: u32, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn is_available(&self) -> bool

Source

fn provider_name(&self) -> &str

Source

fn model_name(&self) -> &str

Implementors§