We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1e17d7 commit 71a8e22Copy full SHA for 71a8e22
llama-cpp-2/src/sampling.rs
@@ -62,6 +62,15 @@ impl LlamaSampler {
62
self
63
}
64
65
+ /// Resets the internal state of the sampler.
66
+ ///
67
+ /// This can be useful when you want to start fresh with a sampler without creating a new instance.
68
+ pub fn reset(&mut self) {
69
+ unsafe {
70
+ llama_cpp_sys_2::llama_sampler_reset(self.sampler);
71
+ }
72
73
+
74
/// Combines a list of samplers into a single sampler that applies each component sampler one
75
/// after another.
76
///
0 commit comments