pub trait AsyncExampleSelector<E>: Send + Sync{
// Required method
fn select_async<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
input: &'life1 str,
examples: &'life2 [E],
) -> Pin<Box<dyn Future<Output = Result<Vec<E>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
Async-first variant of cognis_core::prompts::ExampleSelector.
Use when you want to call selection from within an async context
without going through block_in_place.
Required Methods§
Sourcefn select_async<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
input: &'life1 str,
examples: &'life2 [E],
) -> Pin<Box<dyn Future<Output = Result<Vec<E>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn select_async<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
input: &'life1 str,
examples: &'life2 [E],
) -> Pin<Box<dyn Future<Output = Result<Vec<E>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Select examples to include for input.