Skip to main content

EmbeddingBackendFactory

Trait EmbeddingBackendFactory 

Source
pub trait EmbeddingBackendFactory: Send + Sync {
    // Required method
    fn build(
        &self,
        model: &str,
        ollama_url: &str,
    ) -> Result<Box<dyn EmbeddingBackend>>;
}
Expand description

Produces an EmbeddingBackend for a (model, base_url) pair. The MCP server uses this indirection so tests can inject a deterministic backend without opening a network connection.

Required Methods§

Source

fn build( &self, model: &str, ollama_url: &str, ) -> Result<Box<dyn EmbeddingBackend>>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§