pub struct LlamaSampler {
pub backend: Arc<LlamaLib>,
pub handle: *mut llama_sampler,
}Fields§
§backend: Arc<LlamaLib>§handle: *mut llama_samplerImplementations§
Source§impl LlamaSampler
impl LlamaSampler
pub fn new_greedy(backend: Arc<LlamaLib>) -> Self
pub fn sample(&self, ctx: &LlamaContext, idx: i32) -> llama_token
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LlamaSampler
impl RefUnwindSafe for LlamaSampler
impl !Send for LlamaSampler
impl !Sync for LlamaSampler
impl Unpin for LlamaSampler
impl UnsafeUnpin for LlamaSampler
impl UnwindSafe for LlamaSampler
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