pub struct ModelConfig {
pub model: EmbeddingModel,
pub name: &'static str,
pub hf_repo: &'static str,
pub onnx_path: &'static str,
pub vocab_file: VocabSource,
pub dimensions: usize,
pub max_seq_len: usize,
pub model_min_bytes: u64,
pub vocab_min_bytes: u64,
pub query_prefix: Option<&'static str>,
pub document_prefix: Option<&'static str>,
pub needs_token_type_ids: bool,
}Expand description
Complete configuration for a single embedding model.
Fields§
§model: EmbeddingModel§name: &'static str§hf_repo: &'static str§onnx_path: &'static str§vocab_file: VocabSource§dimensions: usize§max_seq_len: usize§model_min_bytes: u64§vocab_min_bytes: u64§query_prefix: Option<&'static str>Optional prefix prepended to queries before embedding.
document_prefix: Option<&'static str>Optional prefix prepended to documents/code before embedding.
needs_token_type_ids: boolWhether the model expects token_type_ids input (BERT-style). Some models (e.g. nomic-embed) only use input_ids + attention_mask.
Implementations§
Trait Implementations§
Source§impl Clone for ModelConfig
impl Clone for ModelConfig
Source§fn clone(&self) -> ModelConfig
fn clone(&self) -> ModelConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ModelConfig
impl RefUnwindSafe for ModelConfig
impl Send for ModelConfig
impl Sync for ModelConfig
impl Unpin for ModelConfig
impl UnsafeUnpin for ModelConfig
impl UnwindSafe for ModelConfig
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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>
Converts
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>
Converts
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