pub struct EngineBuilder { /* private fields */ }Expand description
Engine builder for creating inference engines with registry-based components
Implementations§
Source§impl EngineBuilder
impl EngineBuilder
Sourcepub fn new(config: EngineConfig) -> Self
pub fn new(config: EngineConfig) -> Self
Create a new engine builder with default registry
Sourcepub fn with_registry(
config: EngineConfig,
registry: Arc<ComponentRegistry>,
) -> Self
pub fn with_registry( config: EngineConfig, registry: Arc<ComponentRegistry>, ) -> Self
Create a new engine builder with a custom registry
pub fn with_model_sources( self, sources: Arc<ProductionModelSourceBundle>, ) -> Self
pub fn with_prepared_model(self, prepared: Arc<PreparedProductionModel>) -> Self
Sourcepub fn with_tokenizer(self, name: impl Into<String>) -> Self
pub fn with_tokenizer(self, name: impl Into<String>) -> Self
Set the tokenizer to use by name
Sourcepub fn with_custom_tokenizer(
self,
tokenizer: Arc<dyn Tokenizer + Send + Sync>,
) -> Self
pub fn with_custom_tokenizer( self, tokenizer: Arc<dyn Tokenizer + Send + Sync>, ) -> Self
Set a pre-created tokenizer
Sourcepub fn with_sampler(self, name: impl Into<String>) -> Self
pub fn with_sampler(self, name: impl Into<String>) -> Self
Set the sampler to use by name
Sourcepub fn with_custom_sampler(
self,
sampler: Arc<dyn Sampler + Send + Sync>,
) -> Self
pub fn with_custom_sampler( self, sampler: Arc<dyn Sampler + Send + Sync>, ) -> Self
Set a pre-created sampler
Sourcepub fn with_scheduler(self, name: impl Into<String>) -> Self
pub fn with_scheduler(self, name: impl Into<String>) -> Self
Set the scheduler to use by name
Sourcepub fn with_custom_scheduler(
self,
scheduler: Arc<dyn Scheduler + Send + Sync>,
) -> Self
pub fn with_custom_scheduler( self, scheduler: Arc<dyn Scheduler + Send + Sync>, ) -> Self
Set a pre-created scheduler
Sourcepub fn with_kv_cache(self, name: impl Into<String>) -> Self
pub fn with_kv_cache(self, name: impl Into<String>) -> Self
Set the KV cache to use by name
Sourcepub fn with_custom_kv_cache(
self,
kv_cache: Arc<dyn KvCacheManager + Send + Sync>,
) -> Self
pub fn with_custom_kv_cache( self, kv_cache: Arc<dyn KvCacheManager + Send + Sync>, ) -> Self
Set a pre-created KV cache manager
Sourcepub fn with_custom_recurrent_state_manager(
self,
manager: Arc<dyn RecurrentStateManager + Send + Sync>,
) -> Self
pub fn with_custom_recurrent_state_manager( self, manager: Arc<dyn RecurrentStateManager + Send + Sync>, ) -> Self
Set a pre-created recurrent-state manager.
Sourcepub fn with_executor(self, name: impl Into<String>) -> Self
pub fn with_executor(self, name: impl Into<String>) -> Self
Set the executor to use by name
Sourcepub fn with_custom_executor(
self,
executor: Arc<dyn ModelExecutor + Send + Sync>,
) -> Self
pub fn with_custom_executor( self, executor: Arc<dyn ModelExecutor + Send + Sync>, ) -> Self
Set a pre-created model executor
Auto Trait Implementations§
impl !RefUnwindSafe for EngineBuilder
impl !UnwindSafe for EngineBuilder
impl Freeze for EngineBuilder
impl Send for EngineBuilder
impl Sync for EngineBuilder
impl Unpin for EngineBuilder
impl UnsafeUnpin 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
impl<T> ErasedDestructor for Twhere
T: 'static,
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