pub trait KnowledgeSource: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn source_type(&self) -> &str;
fn query<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 str,
max_results: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<KnowledgeChunk>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn ingest<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
content: &'life1 str,
source: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn is_available(&self) -> bool;
}Expand description
Trait for external knowledge sources the agent can query.