pub struct ClientBuilder { /* private fields */ }Expand description
Builder for Client.
Construct one with Client::builder, then chain optional setters and
finish with ClientBuilder::build. Every field except model_path
has a sensible default, so the minimal usage is:
let client = rig_llama_cpp::Client::builder("path/to/model.gguf").build()?;The builder shape is forward-compatible: new optional knobs can be added without breaking existing call sites.
Implementations§
Source§impl ClientBuilder
impl ClientBuilder
Sourcepub fn n_ctx(self, n_ctx: u32) -> Self
pub fn n_ctx(self, n_ctx: u32) -> Self
Desired context window size in tokens. Defaults to 4096.
Sourcepub fn sampling(self, sampling: SamplingParams) -> Self
pub fn sampling(self, sampling: SamplingParams) -> Self
Token sampling parameters.
Sourcepub fn fit(self, fit: FitParams) -> Self
pub fn fit(self, fit: FitParams) -> Self
Automatic-fit parameters (per-device memory margins, minimum context).
Sourcepub fn kv_cache(self, kv_cache: KvCacheParams) -> Self
pub fn kv_cache(self, kv_cache: KvCacheParams) -> Self
KV cache data-type configuration. Defaults to F16 / F16.
Sourcepub fn checkpoints(self, checkpoint: CheckpointParams) -> Self
pub fn checkpoints(self, checkpoint: CheckpointParams) -> Self
In-memory state-checkpoint cache tunables (used by hybrid/recurrent models to preserve KV state across turns).
Sourcepub fn mmproj(self, mmproj_path: impl Into<String>) -> Self
pub fn mmproj(self, mmproj_path: impl Into<String>) -> Self
Path to a multimodal projector (mmproj) GGUF file. Setting this
switches the resulting Client into vision mode. Only available
when the mtmd feature is enabled.