pub trait ThreadGenerator: Send + Sync {
// Required method
fn generate_thread<'life0, 'life1, 'async_trait>(
&'life0 self,
topic: &'life1 str,
count: Option<usize>,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, ContentLoopError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Trait for generating multi-tweet threads.
Required Methods§
Sourcefn generate_thread<'life0, 'life1, 'async_trait>(
&'life0 self,
topic: &'life1 str,
count: Option<usize>,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, ContentLoopError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn generate_thread<'life0, 'life1, 'async_trait>(
&'life0 self,
topic: &'life1 str,
count: Option<usize>,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, ContentLoopError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Generate a thread of tweets on the given topic.
If count is Some, generate exactly that many tweets.
Otherwise, the LLM decides (typically 5-8).