pub struct EngineBuilder { /* private fields */ }Expand description
Builder for the inference engine (high-level orchestrator).
Validates configuration and sampling parameters together. Cannot create an actual engine without a GGUF file, but returns the validated config and sampler ready for engine construction.
Implementations§
Source§impl EngineBuilder
impl EngineBuilder
Sourcepub fn config(self, config: OxiBonsaiConfig) -> Self
pub fn config(self, config: OxiBonsaiConfig) -> Self
Set the configuration directly.
Sourcepub fn config_file(self, path: &str) -> RuntimeResult<Self>
pub fn config_file(self, path: &str) -> RuntimeResult<Self>
Load configuration from a TOML file.
Sourcepub fn sampler(self, builder: SamplerBuilder) -> Self
pub fn sampler(self, builder: SamplerBuilder) -> Self
Set a custom sampler builder.
Sourcepub fn kernel_tier(self, tier: &str) -> Self
pub fn kernel_tier(self, tier: &str) -> Self
Set the preferred kernel tier (e.g. “reference”, “avx2”, “neon”).
Sourcepub fn configured_kernel_tier(&self) -> Option<&str>
pub fn configured_kernel_tier(&self) -> Option<&str>
Get the configured kernel tier name, if any.
Sourcepub fn build(self) -> RuntimeResult<(OxiBonsaiConfig, Sampler)>
pub fn build(self) -> RuntimeResult<(OxiBonsaiConfig, Sampler)>
Validate and build the config + sampler pair.
Returns the validated configuration and sampler, ready for engine construction once a GGUF file is available.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EngineBuilder
impl RefUnwindSafe for EngineBuilder
impl Send for EngineBuilder
impl Sync for EngineBuilder
impl Unpin for EngineBuilder
impl UnsafeUnpin for EngineBuilder
impl UnwindSafe for EngineBuilder
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> 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