Skip to main content

SearchProvider

Trait SearchProvider 

Source
pub trait SearchProvider: Send + Sync {
    // Required method
    fn search<'life0, 'life1, 'async_trait>(
        &'life0 self,
        query: &'life1 str,
        max_results: usize,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<SearchResult>, ToolError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
}
Expand description

Adapter trait the SearchTool dispatches to.

§Production impl status (1.0)

BYO at 1.0 — no first-party production search-provider companion ships in the 1.0 release. Operators implement SearchProvider against their chosen vendor (Brave / Tavily / Perplexity / Bing / …); the SDK ships only the trait surface plus SearchTool for binding it into ToolRegistry.

Companion crates (entelix-search-tavily, entelix-search-brave, …) are planned post-1.0 once a stable vendor choice consolidates. Shipping a placeholder companion at 1.0 would violate invariant 14 (no production-shaped fakes).

Required Methods§

Source

fn search<'life0, 'life1, 'async_trait>( &'life0 self, query: &'life1 str, max_results: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<SearchResult>, ToolError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Run a query and return up to max_results hits, in descending relevance order. Implementations must respect max_results by truncation; callers depend on the cap as a cost-control signal.

Implementors§