#[repr(C)]pub struct CrispasrChatOpenParams {
pub n_threads: c_int,
pub n_threads_batch: c_int,
pub n_ctx: c_int,
pub n_batch: c_int,
pub n_ubatch: c_int,
pub n_gpu_layers: c_int,
pub use_mmap: bool,
pub use_mlock: bool,
pub embeddings: bool,
pub chat_template: *const c_char,
}Expand description
Per-session, model-level open params. Fill via
crispasr_chat_open_params_default before overriding fields — the C
side reads every one of them.
Fields§
§n_threads: c_int§n_threads_batch: c_int§n_ctx: c_intContext window in tokens; 0 = the model’s own default.
n_batch: c_int§n_ubatch: c_int§n_gpu_layers: c_int-1 = offload all layers, 0 = CPU only.
use_mmap: bool§use_mlock: bool§embeddings: bool§chat_template: *const c_charOverrides the template baked into the GGUF; null reads
tokenizer.chat_template from the model. Copied by the callee.
Trait Implementations§
Source§impl Clone for CrispasrChatOpenParams
impl Clone for CrispasrChatOpenParams
Source§fn clone(&self) -> CrispasrChatOpenParams
fn clone(&self) -> CrispasrChatOpenParams
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 moreimpl Copy for CrispasrChatOpenParams
Source§impl Debug for CrispasrChatOpenParams
impl Debug for CrispasrChatOpenParams
Auto Trait Implementations§
impl !Send for CrispasrChatOpenParams
impl !Sync for CrispasrChatOpenParams
impl Freeze for CrispasrChatOpenParams
impl RefUnwindSafe for CrispasrChatOpenParams
impl Unpin for CrispasrChatOpenParams
impl UnsafeUnpin for CrispasrChatOpenParams
impl UnwindSafe for CrispasrChatOpenParams
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