pub struct SubEmbeddingSettings {Show 16 fields
pub source: Setting<EmbedderSource>,
pub model: Setting<String>,
pub revision: Setting<String>,
pub pooling: Setting<OverridePooling>,
pub api_key: Setting<String>,
pub dimensions: Setting<usize>,
pub document_template: Setting<String>,
pub document_template_max_bytes: Setting<usize>,
pub url: Setting<String>,
pub request: Setting<Value>,
pub response: Setting<Value>,
pub headers: Setting<BTreeMap<String, String>>,
pub distribution: Setting<DistributionShift>,
pub binary_quantized: Setting<bool>,
pub search_embedder: Setting<Value>,
pub indexing_embedder: Setting<Value>,
}Fields§
§source: Setting<EmbedderSource>The source used to provide the embeddings.
Which embedder parameters are available and mandatory is determined by the value of this setting.
§🔄 Reindexing
- 🏗️ Changing the value of this parameter always regenerates embeddings.
§Defaults
- Defaults to
openAi
model: Setting<String>The name of the model to use.
§Mandatory
- This parameter is mandatory for source
ollama
§Availability
- This parameter is available for sources
openAi,huggingFace,ollama
§🔄 Reindexing
- 🏗️ Changing the value of this parameter always regenerates embeddings.
§Defaults
- For source
openAi, defaults totext-embedding-3-small - For source
huggingFace, defaults toBAAI/bge-base-en-v1.5
revision: Setting<String>The revision (commit SHA1) of the model to use.
If unspecified, Meilisearch picks the latest revision of the model.
§Availability
- This parameter is available for source
huggingFace
§🔄 Reindexing
- 🏗️ Changing the value of this parameter always regenerates embeddings
§Defaults
- When
modelis set to default, defaults to617ca489d9e86b49b8167676d8220688b99db36e - Otherwise, defaults to
null
pooling: Setting<OverridePooling>The pooling method to use.
§Availability
- This parameter is available for source
huggingFace
§🔄 Reindexing
- 🏗️ Changing the value of this parameter always regenerates embeddings
§Defaults
- Defaults to
useModel
§Compatibility Note
- Embedders created before this parameter was available default to
forceMeanto preserve the existing behavior.
api_key: Setting<String>The API key to pass to the remote embedder while making requests.
§Availability
- This parameter is available for source
openAi,ollama,rest
§🔄 Reindexing
- 🌱 Changing the value of this parameter never regenerates embeddings
§Defaults
- For source
openAi, the key is read fromOPENAI_API_KEY, thenMEILI_OPENAI_API_KEY. - For other sources, no bearer token is sent if this parameter is not set.
§Note
- This setting is partially hidden when returned by the settings
dimensions: Setting<usize>The expected dimensions of the embeddings produced by this embedder.
§Mandatory
- This parameter is mandatory for source
userProvided
§Availability
- This parameter is available for source
openAi,ollama,rest,userProvided
§🔄 Reindexing
- 🏗️ When the source is
openAi, changing the value of this parameter always regenerates embeddings - 🌱 For other sources, changing the value of this parameter never regenerates embeddings
§Defaults
- For source
openAi, the dimensions is the maximum allowed by the model. - For sources
ollamaandrest, the dimensions are inferred by embedding a sample text.
document_template: Setting<String>A liquid template used to render documents to a text that can be embedded.
Meillisearch interpolates the template for each document and sends the resulting text to the embedder. The embedder then generates document vectors based on this text.
§Availability
- This parameter is available for source
openAi,huggingFace,ollamaand `rest
§🔄 Reindexing
- 🏗️ When modified, embeddings are regenerated for documents whose rendering through the template produces a different text.
document_template_max_bytes: Setting<usize>Rendered texts are truncated to this size.
§Availability
- This parameter is available for source
openAi,huggingFace,ollamaandrest
§🔄 Reindexing
- 🏗️ When increased, embeddings are regenerated for documents whose rendering through the template produces a different text.
- 🌱 When decreased, embeddings are never regenerated
§Default
- Defaults to 400
url: Setting<String>URL to reach the remote embedder.
§Mandatory
- This parameter is mandatory for source
rest
§Availability
- This parameter is available for source
openAi,ollamaandrest
§🔄 Reindexing
- 🌱 When modified for source
openAi, embeddings are never regenerated - 🏗️ When modified for sources
ollamaandrest, embeddings are always regenerated
request: Setting<Value>Template request to send to the remote embedder.
§Mandatory
- This parameter is mandatory for source
rest
§Availability
- This parameter is available for source
rest
§🔄 Reindexing
- 🏗️ Changing the value of this parameter always regenerates embeddings
response: Setting<Value>Template response indicating how to find the embeddings in the response from the remote embedder.
§Mandatory
- This parameter is mandatory for source
rest
§Availability
- This parameter is available for source
rest
§🔄 Reindexing
- 🏗️ Changing the value of this parameter always regenerates embeddings
headers: Setting<BTreeMap<String, String>>Additional headers to send to the remote embedder.
§Availability
- This parameter is available for source
rest
§🔄 Reindexing
- 🌱 Changing the value of this parameter never regenerates embeddings
distribution: Setting<DistributionShift>§binary_quantized: Setting<bool>§search_embedder: Setting<Value>§indexing_embedder: Setting<Value>Trait Implementations§
Source§impl Clone for SubEmbeddingSettings
impl Clone for SubEmbeddingSettings
Source§fn clone(&self) -> SubEmbeddingSettings
fn clone(&self) -> SubEmbeddingSettings
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl ComposeSchema for SubEmbeddingSettings
impl ComposeSchema for SubEmbeddingSettings
Source§impl Debug for SubEmbeddingSettings
impl Debug for SubEmbeddingSettings
Source§impl Default for SubEmbeddingSettings
impl Default for SubEmbeddingSettings
Source§fn default() -> SubEmbeddingSettings
fn default() -> SubEmbeddingSettings
Source§impl<'de> Deserialize<'de> for SubEmbeddingSettings
impl<'de> Deserialize<'de> for SubEmbeddingSettings
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>,
Source§impl<__Deserr_E> Deserr<__Deserr_E> for SubEmbeddingSettingswhere
__Deserr_E: DeserializeError,
impl<__Deserr_E> Deserr<__Deserr_E> for SubEmbeddingSettingswhere
__Deserr_E: DeserializeError,
Source§fn deserialize_from_value<V: IntoValue>(
deserr_value__: Value<V>,
deserr_location__: ValuePointerRef<'_>,
) -> Result<Self, __Deserr_E>
fn deserialize_from_value<V: IntoValue>( deserr_value__: Value<V>, deserr_location__: ValuePointerRef<'_>, ) -> Result<Self, __Deserr_E>
Self from the given value. Note that this method is an
implementation detail. You probably want to use the deserialize function directly instead.Source§impl From<EmbeddingSettings> for SubEmbeddingSettings
impl From<EmbeddingSettings> for SubEmbeddingSettings
Source§fn from(value: EmbeddingSettings) -> Self
fn from(value: EmbeddingSettings) -> Self
Source§impl PartialEq for SubEmbeddingSettings
impl PartialEq for SubEmbeddingSettings
Source§impl Serialize for SubEmbeddingSettings
impl Serialize for SubEmbeddingSettings
Source§impl ToSchema for SubEmbeddingSettings
impl ToSchema for SubEmbeddingSettings
impl Eq for SubEmbeddingSettings
impl StructuralPartialEq for SubEmbeddingSettings
Auto Trait Implementations§
impl Freeze for SubEmbeddingSettings
impl RefUnwindSafe for SubEmbeddingSettings
impl Send for SubEmbeddingSettings
impl Sync for SubEmbeddingSettings
impl Unpin for SubEmbeddingSettings
impl UnwindSafe for SubEmbeddingSettings
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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