pub struct Embedder {Show 17 fields
pub source: EmbedderSource,
pub url: Option<String>,
pub api_key: Option<String>,
pub model: Option<String>,
pub revision: Option<String>,
pub pooling: Option<String>,
pub document_template: Option<String>,
pub document_template_max_bytes: Option<usize>,
pub dimensions: Option<usize>,
pub distribution: Option<EmbedderDistribution>,
pub request: Option<Value>,
pub response: Option<Value>,
pub binary_quantized: Option<bool>,
pub indexing_embedder: Option<Box<Embedder>>,
pub search_embedder: Option<Box<Embedder>>,
pub indexing_fragments: Option<HashMap<String, EmbedderFragment>>,
pub search_fragments: Option<HashMap<String, EmbedderFragment>>,
}Fields§
§source: EmbedderSourceThe third-party tool that will generate embeddings from documents
url: Option<String>The URL Meilisearch contacts when querying the embedder
api_key: Option<String>Authentication token Meilisearch should send with each request to the embedder. If not present, Meilisearch will attempt to read it from environment variables
model: Option<String>The model your embedder uses when generating vectors
revision: Option<String>Model revision hash
pooling: Option<String>Pooling method for Hugging Face embedders
document_template: Option<String>Template defining the data Meilisearch sends to the embedder
document_template_max_bytes: Option<usize>Maximum allowed size of rendered document template
dimensions: Option<usize>Number of dimensions in the chosen model. If not supplied, Meilisearch tries to infer this value
distribution: Option<EmbedderDistribution>Describes the natural distribution of search results.
request: Option<Value>A JSON value representing the request Meilisearch makes to the remote embedder
response: Option<Value>A JSON value representing the response Meilisearch expects from the remote embedder
binary_quantized: Option<bool>Once set to true, irreversibly converts all vector dimensions to 1-bit values
indexing_embedder: Option<Box<Embedder>>Configures embedder to vectorize documents during indexing (composite embedders only)
search_embedder: Option<Box<Embedder>>Configures embedder to vectorize search queries (composite embedders only)
indexing_fragments: Option<HashMap<String, EmbedderFragment>>Configures multimodal embedding generation at indexing time.
search_fragments: Option<HashMap<String, EmbedderFragment>>Configures incoming media fragments for multimodal search queries.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Embedder
impl<'de> Deserialize<'de> for Embedder
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl StructuralPartialEq for Embedder
Auto Trait Implementations§
impl Freeze for Embedder
impl RefUnwindSafe for Embedder
impl Send for Embedder
impl Sync for Embedder
impl Unpin for Embedder
impl UnwindSafe for Embedder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more