pub trait SummarizationProvider: Send + Sync {
// Required methods
fn summarize<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
content: &'life1 str,
config: &'life2 SummarizeConfig,
) -> Pin<Box<dyn Future<Output = CellstateResult<String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn extract_artifacts<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
content: &'life1 str,
types: &'life2 [ArtifactType],
) -> Pin<Box<dyn Future<Output = CellstateResult<Vec<ExtractedArtifact>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn detect_contradiction<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
a: &'life1 str,
b: &'life2 str,
) -> Pin<Box<dyn Future<Output = CellstateResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
Async trait for summarization providers.
This is the interface definition only - implementations live in crates/api/src/providers/.
Required Methods§
Sourcefn summarize<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
content: &'life1 str,
config: &'life2 SummarizeConfig,
) -> Pin<Box<dyn Future<Output = CellstateResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn summarize<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
content: &'life1 str,
config: &'life2 SummarizeConfig,
) -> Pin<Box<dyn Future<Output = CellstateResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Summarize content according to the provided configuration.
Sourcefn extract_artifacts<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
content: &'life1 str,
types: &'life2 [ArtifactType],
) -> Pin<Box<dyn Future<Output = CellstateResult<Vec<ExtractedArtifact>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn extract_artifacts<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
content: &'life1 str,
types: &'life2 [ArtifactType],
) -> Pin<Box<dyn Future<Output = CellstateResult<Vec<ExtractedArtifact>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Extract artifacts of specified types from content.
Sourcefn detect_contradiction<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
a: &'life1 str,
b: &'life2 str,
) -> Pin<Box<dyn Future<Output = CellstateResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn detect_contradiction<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
a: &'life1 str,
b: &'life2 str,
) -> Pin<Box<dyn Future<Output = CellstateResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Detect if two pieces of content contradict each other.