From e28baf78d4c7c27dae58f3e1d504526e4c533d6e Mon Sep 17 00:00:00 2001 From: 0/0 Date: Fri, 28 Oct 2022 19:45:23 -0600 Subject: [PATCH] fix broken example from breaking changes --- examples/basic_use.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/basic_use.rs b/examples/basic_use.rs index 2ff5ba1..b021c93 100644 --- a/examples/basic_use.rs +++ b/examples/basic_use.rs @@ -1,4 +1,4 @@ -use whisper_rs::{DecodeStrategy, FullParams, WhisperContext}; +use whisper_rs::{FullParams, SamplingStrategy, WhisperContext}; // note that running this example will not do anything, as it is just a // demonstration of how to use the library, and actual usage requires @@ -10,7 +10,7 @@ pub fn usage() { // create a params object // note that currently the only implemented strategy is Greedy, BeamSearch is a WIP // n_past defaults to 0 - let mut params = FullParams::new(DecodeStrategy::Greedy { n_past: 0 }); + let mut params = FullParams::new(SamplingStrategy::Greedy { n_past: 0 }); // edit things as needed // here we set the number of threads to use to 1