pub struct EmbedderConfig {
pub model_dir: PathBuf,
pub runtime_path: PathBuf,
pub provider: ExecutionProvider,
pub truncate_dim: usize,
pub max_tokens: usize,
pub max_batch: usize,
pub intra_threads: usize,
}Fields§
§model_dir: PathBuf§runtime_path: PathBuf§provider: ExecutionProvider§truncate_dim: usize§max_tokens: usize§max_batch: usize§intra_threads: usizeImplementations§
Source§impl EmbedderConfig
impl EmbedderConfig
pub fn new( model_dir: impl Into<PathBuf>, runtime_path: impl Into<PathBuf>, ) -> Self
pub fn with_provider(self, provider: impl Into<ExecutionProvider>) -> Self
pub fn with_truncate_dim(self, dim: usize) -> Self
pub fn with_max_tokens(self, max_tokens: usize) -> Self
Sourcepub fn with_max_batch(self, max_batch: usize) -> Self
pub fn with_max_batch(self, max_batch: usize) -> Self
Rows per ONNX call for the batch methods (default 16, minimum 1).
Sourcepub fn with_intra_threads(self, threads: usize) -> Self
pub fn with_intra_threads(self, threads: usize) -> Self
Intra-op threads for the session (default 1, minimum 1).
Trait Implementations§
Source§impl Clone for EmbedderConfig
impl Clone for EmbedderConfig
Auto Trait Implementations§
impl Freeze for EmbedderConfig
impl RefUnwindSafe for EmbedderConfig
impl Send for EmbedderConfig
impl Sync for EmbedderConfig
impl Unpin for EmbedderConfig
impl UnsafeUnpin for EmbedderConfig
impl UnwindSafe for EmbedderConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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